Details
GDA_CONFIG_SECTION_DATASOURCES
#define GDA_CONFIG_SECTION_DATASOURCES "/apps/gda/Datasources" |
GDA_CONFIG_SECTION_LOG
#define GDA_CONFIG_SECTION_LOG "/apps/gda/Log" |
gda_config_get_string ()
gchar* gda_config_get_string (const gchar *path); |
Gets the value of the specified configuration entry as a string. You
are then responsible to free the returned string
gda_config_get_int ()
gint gda_config_get_int (const gchar *path); |
Gets the value of the specified configuration entry as an integer
gda_config_get_float ()
gdouble gda_config_get_float (const gchar *path); |
Gets the value of the specified configuration entry as a float
gda_config_get_boolean ()
gboolean gda_config_get_boolean (const gchar *path); |
Gets the value of the specified configuration entry as a boolean
gda_config_set_string ()
void gda_config_set_string (const gchar *path,
const gchar *new_value); |
Sets the given configuration entry to contain a string
gda_config_set_int ()
void gda_config_set_int (const gchar *path,
gint new_value); |
Sets the given configuration entry to contain an integer
gda_config_set_float ()
void gda_config_set_float (const gchar *path,
gdouble new_value); |
Sets the given configuration entry to contain a float
gda_config_set_boolean ()
void gda_config_set_boolean (const gchar *path,
gboolean new_value); |
Sets the given configuration entry to contain a boolean
gda_config_remove_section ()
void gda_config_remove_section (const gchar *path); |
Remove the given section from the configuration database
gda_config_remove_key ()
void gda_config_remove_key (const gchar *path); |
Remove the given entry from the configuration database
gda_config_has_section ()
gboolean gda_config_has_section (const gchar *path); |
Checks whether the given section exists in the configuration
system
gda_config_has_key ()
gboolean gda_config_has_key (const gchar *path); |
Check whether the given key exists in the configuration system
gda_config_commit ()
void gda_config_commit (void); |
Commits all changes made to the configuration system. This means that
all buffered data (that is, modified data not yet written to the
configuration database), if any, is actually written to disk
gda_config_rollback ()
void gda_config_rollback (void); |
Discards all changes made to the configuration system.
gda_config_list_sections ()
GList* gda_config_list_sections (const gchar *path); |
Return a GList containing the names of all the sections available
under the given root directory.
To free the returned value, you can use gda_config_free_list
gda_config_list_keys ()
GList* gda_config_list_keys (const gchar *path); |
Returns a list of all keys that exist under the given path.
To free the returned value, you can use gda_config_free_list
GDA_PROVIDER_TYPE()
#define GDA_PROVIDER_TYPE(srv) ((srv) ? (srv)->type : NULL) |
GDA_PROVIDER_NAME()
#define GDA_PROVIDER_NAME(srv) ((srv) ? (srv)->name : NULL) |
GDA_PROVIDER_COMMENT()
#define GDA_PROVIDER_COMMENT(srv) ((srv) ? (srv)->comment : NULL) |
GDA_PROVIDER_LOCATION()
#define GDA_PROVIDER_LOCATION(srv) ((srv) ? (srv)->location : NULL) |
GDA_PROVIDER_REPO_ID()
#define GDA_PROVIDER_REPO_ID(srv) ((srv) ? (srv)->repo_id : NULL) |
GDA_PROVIDER_USERNAME()
#define GDA_PROVIDER_USERNAME(srv) ((srv) ? (srv)->username : NULL) |
GDA_PROVIDER_HOSTNAME()
#define GDA_PROVIDER_HOSTNAME(srv) ((srv) ? (srv)->hostname : NULL) |
GDA_PROVIDER_DOMAIN()
#define GDA_PROVIDER_DOMAIN(srv) ((srv) ? (srv)->domain : NULL) |
GDA_PROVIDER_DSN_PARAMS()
#define GDA_PROVIDER_DSN_PARAMS(srv) ((srv) ? (srv)->dsn_params : NULL) |
gda_provider_new ()
GdaProvider* gda_provider_new (void); |
Allocates memory for a new GdaProvider object and initializes struct
members.
gda_provider_copy ()
GdaProvider* gda_provider_copy (GdaProvider *provider); |
Make a deep copy of all the data needed to describe a GDA provider.
gda_provider_free ()
void gda_provider_free (GdaProvider *provider); |
Frees the memory allocated with gda_provider_new and the memory
allocated to struct members.
gda_provider_list ()
GList* gda_provider_list (void); |
Searches the CORBA database for GDA providers and returns a Glist of
GdaProvider structs.
gda_provider_free_list ()
void gda_provider_free_list (GList *list); |
Frees a list of GdaProvider structures previously returned by
a call to gda_provider_list
gda_provider_find_by_name ()
GdaProvider* gda_provider_find_by_name (const gchar *name); |
Returns a GdaProvider structure describing the given provider. This function
searches all the providers present on your system
and tries to find the specified provider.
gda_list_datasources ()
GList* gda_list_datasources (void); |
Lists all datasources configured on the system. You can then call
gda_config_free_list to free the returned list
gda_list_datasources_for_provider ()
GList* gda_list_datasources_for_provider
(gchar *name); |
Returns a list of the names of all data sources set up for the
given provider.
GDA_DSN_GDA_NAME()
#define GDA_DSN_GDA_NAME(dsn) ((dsn) ? (dsn)->gda_name : 0) |
GDA_DSN_PROVIDER()
#define GDA_DSN_PROVIDER(dsn) ((dsn) ? (dsn)->provider : 0) |
GDA_DSN_DSN()
#define GDA_DSN_DSN(dsn) ((dsn) ? (dsn)->dsn_str : 0) |
GDA_DSN_DESCRIPTION()
#define GDA_DSN_DESCRIPTION(dsn) ((dsn) ? (dsn)->description : 0) |
GDA_DSN_USERNAME()
#define GDA_DSN_USERNAME(dsn) ((dsn) ? (dsn)->username : 0) |
GDA_DSN_CONFIG()
#define GDA_DSN_CONFIG(dsn) ((dsn) ? (dsn)->config : 0) |
gda_dsn_new()
#define gda_dsn_new() g_new0(GdaDsn, 1) |
gda_dsn_free ()
void gda_dsn_free (GdaDsn *dsn); |
Release all memory occupied by the given GdaDsn structure
gda_dsn_copy ()
GdaDsn* gda_dsn_copy (GdaDsn *dsn); |
Make an exact copy of the given GdaDsn structure.
gda_dsn_find_by_name ()
GdaDsn* gda_dsn_find_by_name (const gchar *dsn_name); |
Search in the database for the given data source, and return detailed
information about it
gda_dsn_set_name ()
void gda_dsn_set_name (GdaDsn *dsn,
const gchar *name); |
Set the name for the given GdaDsn structure
gda_dsn_set_provider ()
void gda_dsn_set_provider (GdaDsn *dsn,
const gchar *provider); |
Set the provider for the given GdaDsn structure
gda_dsn_set_dsn ()
void gda_dsn_set_dsn (GdaDsn *dsn,
const gchar *dsn_str); |
Set the connection string for the given GdaDsn structure. This string
is DBMS-independent, so you must take care when filling it in. The best
way to guess about the allowed parameters in this string for each
provider is to obtain the GdaProvider structure for the provider
you want to use, and query the list of available parameters by calling
the GDA_PROVIDER_DSN_PARAMS macro, which returns a GList on which
each node is a string containing the name of one parameter.
For example, a connection string to connect to a PostgreSQL database
might look like this:
"DATABASE=my_database;HOST=localhost
to connect to the database "my_database" at the local machine. On the
other hand, a string for connecting a gda-default's database, might
look like:
"DIRECTORY=/home/me/database"
gda_dsn_set_description ()
void gda_dsn_set_description (GdaDsn *dsn,
const gchar *description); |
Set the description string
gda_dsn_set_username ()
void gda_dsn_set_username (GdaDsn *dsn,
const gchar *username); |
Set the username for the given GdaDsn structure. When using this, the gda-client
library would use this user name when you try to connect to this data source
without specifying a user name in the call to gda_connection_open
gda_dsn_set_config ()
void gda_dsn_set_config (GdaDsn *dsn,
const gchar *config); |
gda_dsn_set_global ()
void gda_dsn_set_global (GdaDsn *dsn,
gboolean is_global); |
gda_dsn_save ()
gboolean gda_dsn_save (GdaDsn *dsn); |
Saves the given data source into the GDA configuration
gda_dsn_remove ()
gboolean gda_dsn_remove (GdaDsn *dsn); |
Remove the given data source (that is, the one described in the given
GdaDsn structure) from the configuration database
gda_dsn_list ()
GList* gda_dsn_list (void); |
Returns a list of all available data sources. The returned value is
a GList of GdaDsn structures
gda_dsn_free_list ()
void gda_dsn_free_list (GList *list); |
Free the given list, which should be a list of GdaDsn structures,
as returned by gda_dsn_list