gda.server_provider
Module for [ServerProvider] class
Types 4
Methods
ServerProvider self()Returns `this`, for use in `with` statements.ServerProviderGidBuilder builder()Get builder for [gda.server_provider.ServerProvider] Returns: New builder objectstring loadFileContents(string instDir, string dataDir, string filename)Loads and returns the contents of filename, which is searched in several places This function should only be used by database provider's implementationsgda.server_operation.ServerOperation createOperation(gda.connection.Connection cnc, gda.types.ServerOperationType type, gda.set.Set options = null)Creates a new #GdaServerOperation object which can be modified in order to perform the type type of action. The options can contain: <itemizedlist> <listitem>named values which ID is a path in the ...gda.sql_parser.SqlParser createParser(gda.connection.Connection cnc = null)Creates a new #GdaSqlParser object which is adapted to provider (and possibly depending on cnc for the actual database version).string escapeString(gda.connection.Connection cnc, string str)Escapes str for use within an SQL command (to avoid SQL injection attacks). Note that the returned value still needs to be enclosed in single quotes before being used in an SQL statement.string findFile(string instDir, string filename)Finds the location of a filename. This function should only be used by database provider's implementationsgda.data_handler.DataHandler getDataHandlerDbms(gda.connection.Connection cnc, string forType)Find a #GdaDataHandler object to manipulate data of type for_type.gda.data_handler.DataHandler getDataHandlerDefault(gda.connection.Connection cnc, gobject.types.GType type, string dbmsType)Provides the implementation when the default Libgda's data handlers must be usedgda.data_handler.DataHandler getDataHandlerGType(gda.connection.Connection cnc, gobject.types.GType forType)Find a #GdaDataHandler object to manipulate data of type for_type. The returned object must not be modified.string getDefaultDbmsType(gda.connection.Connection cnc, gobject.types.GType type)Get the name of the most common data type which has type type.string getName()Get the name (identifier) of the provider Returns: a string containing the provider's namestring getServerVersion(gda.connection.Connection cnc)Get the version of the database to which the connection is opened.string getVersion()Get the version of the provider. Returns: a string containing the version identification.void handlerDeclare(gda.data_handler.DataHandler dh, gda.connection.Connection cnc, gobject.types.GType gType, string dbmsType)gda.data_handler.DataHandler handlerFind(gda.connection.Connection cnc, gobject.types.GType gType, string dbmsType = null)Reserved to database provider's implementations: get the #GdaDataHandler associated to prov for connection cnc. You probably want to use [gda.server_provider.ServerProvider.getDataHandlerGType].gda.sql_parser.SqlParser internalGetParser()This is a factory method to get a unique instance of a #GdaSqlParser object for each #GdaServerProvider object Don't unref it. Returns: a #GdaSqlParserbool performOperation(gda.connection.Connection cnc, gda.server_operation.ServerOperation op)Performs the operation described by op. Note that op is not destroyed by this method and can be reused.bool performOperationDefault(gda.connection.Connection cnc, gda.server_operation.ServerOperation op)Performs the operation described by op, using the SQL from the rendering of the operationstring renderOperation(gda.connection.Connection cnc, gda.server_operation.ServerOperation op)Creates an SQL statement (possibly using some specific extensions of the DBMS) corresponding to the op operation. Note that the returned string may actually contain more than one SQL statement.gobject.value.Value stringToValue(gda.connection.Connection cnc, string string_, gobject.types.GType preferredType, out string dbmsType)Use provider to create a new #GValue from a single string representation.bool supportsFeature(gda.connection.Connection cnc, gda.types.ConnectionFeature feature)Tests if a feature is supportedbool supportsOperation(gda.connection.Connection cnc, gda.types.ServerOperationType type, gda.set.Set options = null)Tells if provider supports the type of operation on the cnc connection, using the (optional) options parameters.string unescapeString(gda.connection.Connection cnc, string str)Unescapes str for use within an SQL command. This is the exact opposite of [gda.server_provider.ServerProvider.escapeString].string valueToSqlString(gda.connection.Connection cnc, gobject.value.Value from)Produces a fully quoted and escaped string from a GValueFluent builder for [gda.server_provider.ServerProvider]
Methods
classServerProviderException : ErrorWrap