Part II. API reference

Table of Contents

HOWTO for common tasks
Open a connection
Define a data source (DSN)
Build statements without using a parser
INSERT INTO customers (e, f, g) VALUES (##p1::string, 15, 'joe')
SELECT people.firstname AS person, people.lastname, "date" AS birthdate, age FROM people
SELECT c."date", name AS person FROM "select" AS c INNER JOIN orders USING (id)
UPDATE products set ref='A0E''FESP' WHERE id = 14
DELETE FROM items WHERE id = ##theid::int
SELECT myfunc (a, 5, 'Joe') FROM mytable
SELECT name FROM master WHERE id IN (SELECT id FROM subdata)
INSERT INTO customers (e, f, g) SELECT id, name, location FROM subdate
SELECT id, name FROM subdata1 UNION SELECT ident, lastname FROM subdata2
SELECT CASE tag WHEN 'Alpha' THEN 1 WHEN 'Bravo' THEN 2 WHEN 'Charlie' THEN 3 ELSE 0 END FROM data
SELECT product_id, name, sum (4 * 5 * price * 1.200000) FROM invoice_lines
SELECT id, name, adress, cntry_id, FROM customers INNER JOIN countries ON ( = cntry_id)
Execute a SELECT command
Modify the result of a SELECT command
Execute an INSERT, UPDATE or DELETE command
Get the last inserted row
Execute a DDL command
Get information about a table's columns
Update the meta data about a table
Validate a DML statement
Control value's assignment to various objects
Add your own data to a GdaMetaStore
Object Hierarchy
Initialization and configuration
Library initialization — Library initialization and information
Configuration — Access/Management of libgda configuration
Configuring Libgda with environment variables
Connections & commands
GdaConnection — A connection to a database
GdaSqlParser — SQL parser
GdaSqlBuilder — Factory object for statements
GdaStatement — Single SQL statement
GdaRepetitiveStatement — Execute the same statement several times with different values
GdaBatch — Multiple SQL statements grouped together.
GdaHolderContainer for a single GValue
GdaSet — Container for several values
GdaConnectionEventAny event which has occurred on a GdaConnection
GdaTransactionStatus — Keeps track of the transaction status of a connection
GdaXaTransaction — Distributed transaction manager
Description of the data model returned by gda_connection_get_meta_store_data()
Virtual connections
GdaVirtualProvider — Base class for all virtual provider objects
GdaVproviderDataModel — Virtual provider for connections based on a list of GdaDataModel
GdaVproviderHub — Virtual provider for connections based on other connection
GdaVirtualConnection — Base class for all virtual connection objects
GdaVconnectionDataModel — Virtual connection based on a list of GdaDataModel
GdaVconnectionHub — Virtual connection which bind together connections
GdaLdapConnection — LDAP connection objects
Data handling
A single ValueAssorted functions for dealing with GValue values
Custom data validation
GdaHolder controls
GdaSet controls
GdaDataProxy controls
Advanced GdaDataSelect usage
Automatic re-run of the SELECT statement
Invalid parameters
Blobs — Binary data and BLOBs handling
GdaDataModel — Data model interface
GdaDataSelect — Base class for data models returned by the execution of a SELECT statement
GdaDataModel columnsManagement of GdaDataModel column attributes
GdaDataModelIter — Data model iterator
GdaDataModelImport — Importing data from a string or a file
GdaDataPivot — A data model for data summarisation
GdaDataAccessWrapper — Offers a random access on top of a cursor-only access data model
GdaDataModelArrayAn implementation of GdaDataModel based on a GArray
GdaRowIndividual row of a GdaDataModelArray object
GdaDataModelLdap — GdaDataModel to extract LDAP information
GdaDataModelBdb — GdaDataModel to access Berkeley DB database contents
GdaDataModelDir — GdaDataModel to list files in filesystem
GdaDataProxyProxy to hold modifications for any GdaDataModel, providing the GdaDataModel interface itself
GdaDataComparator — Simple data model's contents comparison
Implementing your own data model
Virtual methods
Signalling changes
GdaTree — A tree-structure
GdaTreeManager — Base class for all the tree managers
GdaTreeNodeA node in a GdaTree
GdaTreeMgrLabel — A tree manager which creates a single node
GdaTreeMgrSelect — A tree manager which creates a node for each row resulting from the execution of a SELECT statement
GdaTreeMgrSchemas — A tree manager which creates a node for each schema in a database
GdaTreeMgrTables — A tree manager which creates a node for each table in a schema
GdaTreeMgrColumns — A tree manager which creates a node for each column of a table
GdaTreeMgrLdap — A tree manager which creates a node for each child entry of an LDAP entry
Data conversions
GdaDataHandler — Interface which provides data handling (conversions) capabilities
GdaHanderString — Default handler for string values
GdaHanderBoolean — Default handler for boolean values
GdaHanderTime — Default handler for time values
GdaHanderNumerical — Default handler for numeric values
GdaHanderBin — Default handler for binary values
GdaHanderType — Default handler for GType values
Dictionary - metadata
Adding custom data
Database structure
Data types
SQL identifiers
Short and full names
Declared foreign keys
Individual table description
GdaMetaStore — Dictionary object
GdaMetaStruct — In memory representation of some database objects
Data definition (DDL) queries
GdaServerOperation — Handles any DDL query in an abstract way
GdaServerOperation: individual nodes — Getting information about parts (nodes) composing a path
GdaServerOperation: sequences — Manipulating sequences
User interface API reference
Library initialization — Library initialization and information
GdauiLogin — Connection opening widget
GdauiProviderSelector — Select a database provider from a combo box
GdauiDataSelectorSelecting data in a GdaDataModel
GdauiDataProxyDisplaying and modifying data in a GdaDataProxy
GdauiBasicFormForm widget mapping the values contained in a GdaSet
GdauiFormForm widget to manipulate data in a GdaDataModel, with decorations
GdauiRawFormForm widget to manipulate data in a GdaDataModel
GdauiGridGrid widget to manipulate data in a GdaDataModel, with decorations
GdauiRawGridGrid widget to manipulate data in a GdaDataModel
GdauiComboCombo box to choose from the contents of a GdaDataModel
GdauiCloud — Cloud widget
GdauiRtEditorRich text editor which uses a subset of the txt2tags markup.
UI plugins — Plugin to customize dana entry widgets and call renderers in tree views
GdauiDataEntry — Data entry widget
GdauiDataStoreBridge between a GdaDataModel and a GtkTreeModel
GdauiDataFilterEntrer rules to filter the rows in a GdauiDataProxy
GdauiDataProxyInfoShows information & actions about a GdauiDataProxy widget
GdauiServerOperation — Enter information to perform a DDL query
GdauiTreeStoreBridge between a GdaTree and a GtkTreeModel
UI Utility functions — Set of UI related functions
Multi threading
GdaMutex — Recursive mutex implementation
GdaLockable — Interface for locking objects in a multi threaded environment
GdaThreadWrapper — Execute functions in a sub thread
Utility functions — Utility functions
Logging — Log functions
Attributes manager — Manager for lists of attributes

The following sections describe the API available for GDA applications.