Adds an event to the given connection. This function is usually called by providers, to inform clients of events that happened during some operation.
Declares that prepared_stmt is a prepared statement object associated to gda_stmt within the connection (meaning the connection increments the reference counter of prepared_stmt).
Adds a SAVEPOINT named name.
Requests that a task be cancelled. This operation may of may not have any effect depending on the task's status, even if it returns true. If it returns false, then the task has not been cancelled.
Use this method to obtain the result of the execution of a statement which has been executed asynchronously by calling gda.connection.Connection.asyncStatementExecute. This function is non locking and will return null (and no error will be set) if the statement has not been executed yet.
Executes all the statements contained in batch (in the order in which they were added to batch), and returns a list of #GObject objects, at most one #GObject for each statement; see gda.connection.Connection.statementExecute for details about the returned objects.
Starts a transaction on the data source, identified by the name parameter.
This function lets you clear the list of #GdaConnectionEvent's of the given connection.
Closes the connection to the underlying data source, but first emits the "conn-to-close" signal.
Closes the connection to the underlying data source, without emiting any warning signal.
Commits the given transaction to the backend database. You need to call gda.connection.Connection.beginTransaction first.
Connect to ConnClosed signal.
Connect to ConnOpened signal.
Connect to ConnToClose signal.
Connect to DsnChanged signal.
Connect to Error signal.
Connect to TransactionStatusChanged signal.
Creates a new #GdaServerOperation object which can be modified in order to perform the type type of action. It is a wrapper around the gda.server_provider.ServerProvider.createOperation method.
Creates a new parser object able to parse the SQL dialect understood by cnc. If the #GdaServerProvider object internally used by cnc does not have its own parser, then null is returned, and a general SQL parser can be obtained using gda.sql_parser.SqlParser.new_.
Removes any prepared statement associated to gda_stmt in cnc: this undoes what gda.connection.Connection.addPreparedStatement does.
This is a convenience function, which creates a DELETE statement and executes it using the values provided. It internally relies on variables which makes it immune to SQL injection problems.
Delete the SAVEPOINT named name when not used anymore.
This is a convenience function to execute a SQL command over the opened connection. For the returned value, see gda.connection.Connection.statementExecuteNonSelect's documentation.
Execute a SQL SELECT command over an opened connection.
Gets the user name used to open this connection.
Gets the connection string used to open this connection.
This function allows you to determine the actual format for the date values.
Retrieves a list of the last errors occurred during the connection. The returned list is chronologically ordered such as that the most recent event is the #GdaConnectionEvent of the first node.
Get or initializes the #GdaMetaStore associated to cnc
see #gda_connection_get_meta_store_data
Gets the #GdaConnectionOptions used to open this connection.
Retrieves a pointer to an object representing a prepared statement for gda_stmt within cnc. The association must have been done using gda.connection.Connection.addPreparedStatement.
Gets a pointer to the #GdaServerProvider object used to access the database
Gets the name (identifier) of the database provider used by cnc
Get the status of cnc regarding transactions. The returned object should not be modified or destroyed; however it may be modified or destroyed by the connection itself.
col_names and values must have length (>= 1).
Checks whether a connection is open or not.
Tries to open the connection.
This function helps to parse a SQL string which uses parameters and store them at params.
Performs the operation described by op (which should have been created using gda.connection.Connection.createOperation). It is a wrapper around the gda.server_provider.ServerProvider.performOperation method.
Use this method to get a pointer to the next available connection event which can then be customized and taken into account using gda.connection.Connection.addEvent.
Use this method to get a correctly quoted (if necessary) SQL identifier which can be used in SQL statements, from id. If id is already correctly quoted for cnc, then a copy of id may be returned.
Rollback all the modifications made after the SAVEPOINT named name.
Rollbacks the given transaction. This means that all changes made to the underlying data source since the last call to #gda.connection.Connection.beginTransaction or #gda.connection.Connection.commitTransaction will be discarded.
Returns this, for use in with statements.
Executes stmt.
Executes a non-selection statement on the given connection.
Executes a selection command on the given connection.
Ask the database accessed through the cnc connection to prepare the usage of stmt. This is only useful if stmt will be used more than once (however some database providers may always prepare statements before executing them).
Renders stmt as an SQL statement, adapted to the SQL dialect used by cnc
Asks the underlying provider for if a specific feature is supported.
Updates cnc's associated #GdaMetaStore. If context is not null, then only the parts described by context will be updated, and if it is null, then the complete meta store will be updated. Detailed explanations follow:
col_names and values must have length (>= 1).
Produces a fully quoted and escaped string from a GValue
Get eventsHistorySize property.
Set eventsHistorySize property.
Get executionSlowdown property.
Set executionSlowdown property.
Get executionTimer property.
Set executionTimer property.
Get isWrapper property.
Set isWrapper property.
Get monitorWrappedInMainloop property.
Set monitorWrappedInMainloop property.
This function is similar to gda.connection.Connection.openFromDsn, except it does not actually open the connection, you have to open it using gda.connection.Connection.open.
This function is similar to gda.connection.Connection.openFromString, except it does not actually open the connection, you have to open it using gda.connection.Connection.open.
This function is the way of opening database connections with libgda, using a pre-defined data source (DSN), see gda.config.Config.defineDsn for more information about how to define a DSN. If you don't want to define a DSN, it is possible to use gda.connection.Connection.openFromString instead of this method.
Opens a connection given a provider ID and a connection string. This allows applications to open connections without having to create a data source (DSN) in the configuration. The format of cnc_string is similar to PostgreSQL and MySQL connection strings. It is a semicolumn-separated series of <key>=<value> pairs, where each key and value are encoded as per RFC 1738, see gda.global.rfc1738Encode for more information.
Opens an SQLite connection even if the SQLite provider is not installed, to be used by database providers which need a temporary database to store some information.
Extract the provider, connection parameters, username and password from string. in string, the various parts are strings which are expected to be encoded using an RFC 1738 compliant encoding. If they are specified, the returned provider, username and password strings are correctly decoded.
Locks lockable. If it is already locked by another thread, the current thread will block until it is unlocked by the other thread.
Tries to lock lockable. If it is already locked by another thread, then it immediately returns FALSE, otherwise it locks lockable.
Unlocks lockable. This method should not be called if the current does not already holds a lock on lockable (having used gda.lockable.Lockable.lock or gda.lockable.Lockable.trylock).
Set the GObject of a D ObjectWrap wrapper.
Get a pointer to the underlying C object.
Calls g_object_ref() on a GObject.
Calls g_object_unref() on a GObject.
Get the GType of an object.
GObject GType property.
Convenience method to return this cast to a type. For use in D with statements.
Template to get the D object from a C GObject and cast it to the given D object type.
Connect a D closure to an object signal.
Template for setting a GObject property.
Template for getting a GObject property.
Creates a binding between source_property on source and target_property on target.
Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.
This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling gobject.object.ObjectWrap.refSink.
Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.
Gets a named field from the objects table of associations (see gobject.object.ObjectWrap.setData).
Gets a property of an object.
This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata.
Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.
Checks whether object has a floating[floating-ref] reference.
Emits a "notify" signal for the property property_name on object.
Emits a "notify" signal for the property specified by pspec on object.
Increase the reference count of object, and possibly remove the floating[floating-ref] reference, if object has a floating reference.
Releases all references to other objects. This can be used to break reference cycles.
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
Sets a property on an object.
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:
Reverts the effect of a previous call to gobject.object.ObjectWrap.freezeNotify. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.
This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling gobject.closure.Closure.invalidate on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, gobject.object.ObjectWrap.ref_ and gobject.object.ObjectWrap.unref are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.
Connect to Notify signal.
Locks lockable. If it is already locked by another thread, the current thread will block until it is unlocked by the other thread.
Tries to lock lockable. If it is already locked by another thread, then it immediately returns FALSE, otherwise it locks lockable.
Unlocks lockable. This method should not be called if the current does not already holds a lock on lockable (having used gda.lockable.Lockable.lock or gda.lockable.Lockable.trylock).