GNOME Data Access manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
The GdaServerProvider(3) is the class you should implement for adding a new provider. This class is just a typical GObject-based class, with a set of virtual methods, that are the ones that you must implement. These virtual methods are declared in the class structure, in the gda-server-provider.h file. They are:
open_connection
Sets up the connection to the database backend using the parameters received as arguments and returns a boolean TRUE if the connection is successfully established, otherwise FALSE.
close_connection
Frees the resources allocated for the connection and returns TRUE if everything is ok
get_database
Returns the name of the currently open database for a given connection.
change_database
Change the database being used in the active connection.
create_database
Creates a new database whose name is received in a parameter.
drop_database
Drops an existing database whose name is received in a parameter.
execute_command
Executes a command and returns a GList of GdaDataModel(3) with the results.
begin_transaction
Initiates a transaction if the DB backend supports transactions.
commit_transaction
Commits a transaction if the DB backend supports transactions.
rollback_transaction
Rollback a transaction if the DB backend supports transactions.
supports
Tests if a given feature is supported by the provider and the DB backend. You can view the list of features in gda-connection.h, enumeration GdaConnectionFeature.
get_schema
Returns a GdaDataModel(3) with the schema information requested. You can view the list of features in gda-connection.h, enumeration GdaConnectionSchema.