Details
gda_connection_new ()
Allocates space for a client side connection object
gda_connection_new_from_dsn ()
GdaConnection* gda_connection_new_from_dsn (const gchar *dsn_name,
const gchar *username,
const gchar *password); |
Creates a GdaConnection object from the configuration stored for the
given data source.
gda_connection_free ()
If the connection is open the connection is closed and all
associated objects (commands, recordsets, errors) are deleted. The
memory is freed. The connection object cannot be used any more.
gda_connection_set_provider ()
void gda_connection_set_provider (GdaConnection *cnc,
gchar *name); |
Registers name as the provider for this connection. This
should be the id of the CORBA server to
use
gda_connection_get_provider ()
Retuns the provider used for this connection
gda_connection_supports ()
gboolean gda_connection_supports (GdaConnection *cnc,
GDA_Connection_Feature feature); |
Return information on features supported by the underlying database
system.
gda_connection_set_default_db ()
void gda_connection_set_default_db (GdaConnection *cnc,
gchar *dsn); |
Registers the DSN as the name of the default DB to access when the
connection is opened
gda_connection_open ()
gint gda_connection_open (GdaConnection *cnc,
const gchar *dsn,
const gchar *user,
const gchar *pwd); |
The function activates the correct CORBA server (defined with the
#gda_connection_set_provider() function. Then it
tries to open the database using the DSN or the default database
as a data source. If user or pwd is not NULL, it will overwrite the
appropriate entry in the DSN passed as par2. Entries in the DSN have the form
<key> = <value> seperated from the database name . Currently the DSN is not
parsed.
gda_connection_close ()
Closes the connection object and all associated GdaRecordset objects.
GdaCommand objects are not closed, but can't be used anymore. Transactions
pending on this objects are aborted and an error is returned.
gda_connection_open_schema ()
Retrieves meta data about the data source to which the
connection object is connected.
The constraints is a list of enum/string pairs.
The end of the list must be marked by the special value
GDA_Connection_no_CONSTRAINT
gda_connection_open_schema_array ()
Retrieves meta data about the data source to which the
connection object is connected.
The elems is an array of Constraint_Element item. The last item
must have it's type element set to GDA_Connection_no_CONSTRAINT
If elems is NULL, no constraints are used.
gda_connection_modify_schema ()
glong gda_connection_modify_schema (GdaConnection *cnc,
GDA_Connection_QType t,
...); |
gda_connection_get_errors ()
Returns a list of all errors for this connection object. This
function also clears the error list. The errors are stored in LIFO
order, so the last error which happend is stored as the first
element in the list. Advancing the list means to get back in time and
retrieve earlier errors.
The farther away from the client the error happens, the later it
is in the queue. If an error happens on the client and then in the
CORBA layer and then on the server, you will get the server error
first.
gda_connection_begin_transaction ()
Start a new transaction on cnc
gda_connection_commit_transaction ()
Commit a pending transaction on cnc
gda_connection_rollback_transaction ()
Abort and rollback a pending transaction on cnc
gda_connection_execute ()
Executes txt. An internal GdaCommand object is used for
execution. This command object is destroyed automatically after the
commadn has finished.
gda_connection_start_logging ()
gint gda_connection_start_logging (GdaConnection *cnc,
gchar *filename); |
This function causes the server to log the statements
it executes in filename.
gda_connection_stop_logging ()
This function stops the database server logs
gda_connection_create_recordset ()
gda_connection_corba_exception ()
gint gda_connection_corba_exception (GdaConnection *cnc,
CORBA_Environment *ev); |
gda_connection_add_single_error ()
gda_connection_add_error_list ()
void gda_connection_add_error_list (GdaConnection *cnc,
GList *list); |
gda_connection_is_open()
#define gda_connection_is_open(cnc) ((cnc) ? GDA_CONNECTION(cnc)->is_open : FALSE) |
gda_connection_get_dsn()
#define gda_connection_get_dsn(cnc) ((cnc) ? GDA_CONNECTION(cnc)->database : 0) |
gda_connection_get_user()
#define gda_connection_get_user(cnc) ((cnc) ? GDA_CONNECTION(cnc)->user : 0) |
gda_connection_get_password()
#define gda_connection_get_password(cnc) ((cnc) ? GDA_CONNECTION(cnc)->passwd : 0) |
gda_connection_get_version ()
Get the version number of the underlying provider
gda_connection_sql2xml ()
gchar* gda_connection_sql2xml (GdaConnection *cnc,
const gchar *sql); |
Converts the given SQL command to a GdaXmlQuery
gda_connection_xml2sql ()
gchar* gda_connection_xml2sql (GdaConnection *cnc,
const gchar *xml); |
Converts the given GdaXmlQuery to a SQL string for the underlying provider
gda_connection_add_listener ()
gda_connection_remove_listener ()