| gda-config.h | | gda-config.h | |
| /* GDA library | | /* GDA library | |
|
| * Copyright (C) 2007 - 2009 The GNOME Foundation. | | * Copyright (C) 2007 - 2010 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Vivien Malerba <malerba@gnome-db.org> | | * Vivien Malerba <malerba@gnome-db.org> | |
| * | | * | |
| * This Library is free software; you can redistribute it and/or | | * This Library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public License as | | * modify it under the terms of the GNU Library General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| } GdaConfigError; | | } GdaConfigError; | |
| | | | |
| struct _GdaDsnInfo { | | struct _GdaDsnInfo { | |
| gchar *name; /* plain text, not RFC 1738 encoded */ | | gchar *name; /* plain text, not RFC 1738 encoded */ | |
| gchar *provider; /* plain text, not RFC 1738 encoded */ | | gchar *provider; /* plain text, not RFC 1738 encoded */ | |
| gchar *description; /* plain text, not RFC 1738 encoded */ | | gchar *description; /* plain text, not RFC 1738 encoded */ | |
| gchar *cnc_string; /* semi-colon separated <key>=<value> list w
here <key> and <value> are RFC 1738 encoded */ | | gchar *cnc_string; /* semi-colon separated <key>=<value> list w
here <key> and <value> are RFC 1738 encoded */ | |
| gchar *auth_string; /* semi-colon separated <key>=<value> list w
here <key> and <value> are RFC 1738 encoded */ | | gchar *auth_string; /* semi-colon separated <key>=<value> list w
here <key> and <value> are RFC 1738 encoded */ | |
| gboolean is_system; | | gboolean is_system; | |
| | | | |
|
| | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| gpointer _gda_reserved1; | | gpointer _gda_reserved1; | |
| gpointer _gda_reserved2; | | gpointer _gda_reserved2; | |
| gpointer _gda_reserved3; | | gpointer _gda_reserved3; | |
| gpointer _gda_reserved4; | | gpointer _gda_reserved4; | |
| }; | | }; | |
| | | | |
| struct _GdaProviderInfo { | | struct _GdaProviderInfo { | |
| gchar *id; | | gchar *id; | |
| gchar *location; | | gchar *location; | |
| gchar *description; | | gchar *description; | |
| GdaSet *dsn_params; /* Specs to create a DSN */ | | GdaSet *dsn_params; /* Specs to create a DSN */ | |
| GdaSet *auth_params; /* Specs to authenticate a client */ | | GdaSet *auth_params; /* Specs to authenticate a client */ | |
| | | | |
|
| | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| gpointer _gda_reserved1; | | gpointer _gda_reserved1; | |
| gpointer _gda_reserved2; | | gpointer _gda_reserved2; | |
| gpointer _gda_reserved3; | | gpointer _gda_reserved3; | |
| gpointer _gda_reserved4; | | gpointer _gda_reserved4; | |
| }; | | }; | |
| | | | |
| struct _GdaConfig { | | struct _GdaConfig { | |
| GObject object; | | GObject object; | |
| GdaConfigPrivate *priv; | | GdaConfigPrivate *priv; | |
| | | | |
| skipping to change at line 95 | | skipping to change at line 97 | |
| | | | |
| struct _GdaConfigClass { | | struct _GdaConfigClass { | |
| GObjectClass object_class; | | GObjectClass object_class; | |
| | | | |
| /* signals */ | | /* signals */ | |
| void (*dsn_added) (GdaConfig *conf, GdaDsnInfo *ne
w_dsn); | | void (*dsn_added) (GdaConfig *conf, GdaDsnInfo *ne
w_dsn); | |
| void (*dsn_to_be_removed) (GdaConfig *conf, GdaDsnInfo *ol
d_dsn); | | void (*dsn_to_be_removed) (GdaConfig *conf, GdaDsnInfo *ol
d_dsn); | |
| void (*dsn_removed) (GdaConfig *conf, GdaDsnInfo *ol
d_dsn); | | void (*dsn_removed) (GdaConfig *conf, GdaDsnInfo *ol
d_dsn); | |
| void (*dsn_changed) (GdaConfig *conf, GdaDsnInfo *ds
n); | | void (*dsn_changed) (GdaConfig *conf, GdaDsnInfo *ds
n); | |
| | | | |
|
| | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| void (*_gda_reserved1) (void); | | void (*_gda_reserved1) (void); | |
| void (*_gda_reserved2) (void); | | void (*_gda_reserved2) (void); | |
| void (*_gda_reserved3) (void); | | void (*_gda_reserved3) (void); | |
| void (*_gda_reserved4) (void); | | void (*_gda_reserved4) (void); | |
| }; | | }; | |
| | | | |
| GType gda_config_get_type (void) G_GNUC_CONST; | | GType gda_config_get_type (void) G_GNUC_CONST; | |
| GdaConfig* gda_config_get (void); | | GdaConfig* gda_config_get (void); | |
| | | | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| gda-connection.h | | gda-connection.h | |
| /* GDA library | | /* GDA library | |
|
| * Copyright (C) 1998 - 2009 The GNOME Foundation. | | * Copyright (C) 1998 - 2010 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Michael Lausch <michael@lausch.at> | | * Michael Lausch <michael@lausch.at> | |
| * Rodrigo Moya <rodrigo@gnome-db.org> | | * Rodrigo Moya <rodrigo@gnome-db.org> | |
| * Bas Driessen <bas.driessen@xobas.com> | | * Bas Driessen <bas.driessen@xobas.com> | |
| * Vivien Malerba <malerba@gnome-db.org> | | * Vivien Malerba <malerba@gnome-db.org> | |
| * | | * | |
| * This Library is free software; you can redistribute it and/or | | * This Library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public License as | | * modify it under the terms of the GNU Library General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 80 | |
| GObjectClass object_class; | | GObjectClass object_class; | |
| | | | |
| /* signals */ | | /* signals */ | |
| void (*error) (GdaConnection *cnc, GdaConnecti
onEvent *error); | | void (*error) (GdaConnection *cnc, GdaConnecti
onEvent *error); | |
| void (*conn_opened) (GdaConnection *obj); | | void (*conn_opened) (GdaConnection *obj); | |
| void (*conn_to_close) (GdaConnection *obj); | | void (*conn_to_close) (GdaConnection *obj); | |
| void (*conn_closed) (GdaConnection *obj); | | void (*conn_closed) (GdaConnection *obj); | |
| void (*dsn_changed) (GdaConnection *obj); | | void (*dsn_changed) (GdaConnection *obj); | |
| void (*transaction_status_changed)(GdaConnection *obj); | | void (*transaction_status_changed)(GdaConnection *obj); | |
| | | | |
|
| | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| void (*_gda_reserved1) (void); | | void (*_gda_reserved1) (void); | |
| void (*_gda_reserved2) (void); | | void (*_gda_reserved2) (void); | |
| void (*_gda_reserved3) (void); | | void (*_gda_reserved3) (void); | |
| void (*_gda_reserved4) (void); | | void (*_gda_reserved4) (void); | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * GdaConnectionOptions: | | * GdaConnectionOptions: | |
| * @GDA_CONNECTION_OPTIONS_NONE: no specific aspect | | * @GDA_CONNECTION_OPTIONS_NONE: no specific aspect | |
| * @GDA_CONNECTION_OPTIONS_READ_ONLY: this flag specifies that the connecti
on to open should be in a read-only mode | | * @GDA_CONNECTION_OPTIONS_READ_ONLY: this flag specifies that the connecti
on to open should be in a read-only mode | |
| * (this policy is not correctly enforce
d at the moment) | | * (this policy is not correctly enforce
d at the moment) | |
|
| * @GDA_CONNECTION_OPTIONS_THREAD_SAFE: this flag specifies that the connec | | | |
| tion to open will be used | | | |
| * by several threads at once so it has | | | |
| to be thread safe | | | |
| * @GDA_CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE: this flag specif
ies that SQL identifiers submitted as input | | * @GDA_CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE: this flag specif
ies that SQL identifiers submitted as input | |
| * to Libgda have to keep their case sen
sitivity. | | * to Libgda have to keep their case sen
sitivity. | |
|
| | | * @GDA_CONNECTION_OPTIONS_THREAD_SAFE: this flag specifies that the connec | |
| | | tion to open will be used | |
| | | * by several threads at once so it has | |
| | | to be thread safe | |
| | | * @GDA_CONNECTION_OPTIONS_THREAD_ISOLATED: this flag specifies that the co | |
| | | nnection to open will be used | |
| | | * by several threads at once and reque | |
| | | sts that the real connection be used | |
| | | * only in a sub thread created specifi | |
| | | cally for it | |
| * | | * | |
| * | | * | |
| * Specifies some aspects of a connection when opening it. | | * Specifies some aspects of a connection when opening it. | |
| * | | * | |
| * Additional information about the GDA_CONNECTION_OPTIONS_SQL_IDENTIFIERS_
CASE_SENSITIVE flag: | | * Additional information about the GDA_CONNECTION_OPTIONS_SQL_IDENTIFIERS_
CASE_SENSITIVE flag: | |
| * <itemizedlist> | | * <itemizedlist> | |
| * <listitem><para>For example without this flag, if the table | | * <listitem><para>For example without this flag, if the table | |
| * name specified in a #GdaServerOperation to create a table is | | * name specified in a #GdaServerOperation to create a table is | |
| * <emphasis>MyTable</emphasis>, then usually the database will creat
e a table named | | * <emphasis>MyTable</emphasis>, then usually the database will creat
e a table named | |
| * <emphasis>mytable</emphasis>, whereas with this flag, the table wi
ll be created | | * <emphasis>mytable</emphasis>, whereas with this flag, the table wi
ll be created | |
| * as <emphasis>MyTable</emphasis> (note that in the end the database
may still decide | | * as <emphasis>MyTable</emphasis> (note that in the end the database
may still decide | |
| * to name the table <emphasis>mytable</emphasis> or differently if i
t can't do | | * to name the table <emphasis>mytable</emphasis> or differently if i
t can't do | |
| * otherwise).</para></listitem> | | * otherwise).</para></listitem> | |
| * <listitem><para>Libgda will not apply this rule when parsing SQL code,
the SQL code being parsed | | * <listitem><para>Libgda will not apply this rule when parsing SQL code,
the SQL code being parsed | |
| * has to be conform to the database it will be used with</para></lis
titem> | | * has to be conform to the database it will be used with</para></lis
titem> | |
| * </itemizedlist> | | * </itemizedlist> | |
|
| | | * | |
| | | * Additional information about the GDA_CONNECTION_OPTIONS_THREAD_SAFE and | |
| | | GDA_CONNECTION_OPTIONS_THREAD_ISOLATED flags: | |
| | | * The GDA_CONNECTION_OPTIONS_THREAD_SAFE flag specifies that it has to be | |
| | | able to use the returned connection object from | |
| | | * several threads at once (locking is ensured by the #GdaConnection itself | |
| | | ). Depending on the database provider's | |
| | | * implementation and on the native libraries it uses, the "normal" connect | |
| | | ion object might not respect this requirement, | |
| | | * and in this case a specific thread is started and used as the unique thr | |
| | | ead which will manipulate the actual connection, | |
| | | * while a "wrapper connection" is actually returned and used by the caller | |
| | | (that wrapper connection passes method calls | |
| | | * from the calling thread to the actual connection's specific thread, and | |
| | | gets the results back). | |
| | | * | |
| | | * The GDA_CONNECTION_OPTIONS_THREAD_ISOLATED forces using a specific threa | |
| | | d and a "wrapper connection" even if the | |
| | | * "normal" connection would itself be thread safe; this is usefull for exa | |
| | | mple to be sure the asynchronous API can | |
| | | * always be used (see gda_connection_async_statement_execute()). | |
| | | * | |
| | | * Having a specific thread and a "wrapper connection" definitely has an im | |
| | | pact on the performances (because it involves | |
| | | * messages passing between threads for every method call), so using the | |
| | | * GDA_CONNECTION_OPTIONS_THREAD_SAFE or GDA_CONNECTION_OPTIONS_THREAD_ISOL | |
| | | ATED flags should be carefully considered. | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
|
| GDA_CONNECTION_OPTIONS_NONE = 0, | | GDA_CONNECTION_OPTIONS_NONE = 0, | |
| GDA_CONNECTION_OPTIONS_READ_ONLY = 1 << 0, | | GDA_CONNECTION_OPTIONS_READ_ONLY = 1 << 0, | |
| GDA_CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE = 1 << 1, | | GDA_CONNECTION_OPTIONS_SQL_IDENTIFIERS_CASE_SENSITIVE = 1 << 1, | |
|
| GDA_CONNECTION_OPTIONS_THREAD_SAFE = 1 << 2 | | GDA_CONNECTION_OPTIONS_THREAD_SAFE = 1 << 2, | |
| | | GDA_CONNECTION_OPTIONS_THREAD_ISOLATED = 1 << 3 | |
| } GdaConnectionOptions; | | } GdaConnectionOptions; | |
| | | | |
|
| | | /** | |
| | | * GdaConnectionFeature | |
| | | * @GDA_CONNECTION_FEATURE_AGGREGATES: test for aggregates support | |
| | | * @GDA_CONNECTION_FEATURE_BLOBS: test for BLOBS (binary large objects) sup | |
| | | port | |
| | | * @GDA_CONNECTION_FEATURE_INDEXES: test for indexes support | |
| | | * @GDA_CONNECTION_FEATURE_INHERITANCE: test for tables inheritance support | |
| | | * @GDA_CONNECTION_FEATURE_NAMESPACES: test for namespaces support | |
| | | * @GDA_CONNECTION_FEATURE_PROCEDURES: test for functions support | |
| | | * @GDA_CONNECTION_FEATURE_SEQUENCES: test for sequences support | |
| | | * @GDA_CONNECTION_FEATURE_SQL: test for SQL language (even specific to the | |
| | | database) support | |
| | | * @GDA_CONNECTION_FEATURE_TRANSACTIONS: test for transactions support | |
| | | * @GDA_CONNECTION_FEATURE_SAVEPOINTS: test for savepoints within transacti | |
| | | ons support | |
| | | * @GDA_CONNECTION_FEATURE_SAVEPOINTS_REMOVE: test if savepoints can be rem | |
| | | oved | |
| | | * @GDA_CONNECTION_FEATURE_TRIGGERS: test for triggers support | |
| | | * @GDA_CONNECTION_FEATURE_UPDATABLE_CURSOR: test for updatable cursors sup | |
| | | port | |
| | | * @GDA_CONNECTION_FEATURE_USERS: test for users support | |
| | | * @GDA_CONNECTION_FEATURE_VIEWS: test for views support | |
| | | * @GDA_CONNECTION_FEATURE_XA_TRANSACTIONS: test for distributed transactio | |
| | | ns support | |
| | | * @GDA_CONNECTION_FEATURE_MULTI_THREADING: test for native multi-threading | |
| | | support | |
| | | * | |
| | | * Used in gda_connection_supports_feature() and gda_server_provider_suppor | |
| | | ts_feature() to test if a connection | |
| | | * or a database provider supports some specific feature. | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| GDA_CONNECTION_FEATURE_AGGREGATES, | | GDA_CONNECTION_FEATURE_AGGREGATES, | |
| GDA_CONNECTION_FEATURE_BLOBS, | | GDA_CONNECTION_FEATURE_BLOBS, | |
| GDA_CONNECTION_FEATURE_INDEXES, | | GDA_CONNECTION_FEATURE_INDEXES, | |
| GDA_CONNECTION_FEATURE_INHERITANCE, | | GDA_CONNECTION_FEATURE_INHERITANCE, | |
| GDA_CONNECTION_FEATURE_NAMESPACES, | | GDA_CONNECTION_FEATURE_NAMESPACES, | |
| GDA_CONNECTION_FEATURE_PROCEDURES, | | GDA_CONNECTION_FEATURE_PROCEDURES, | |
| GDA_CONNECTION_FEATURE_SEQUENCES, | | GDA_CONNECTION_FEATURE_SEQUENCES, | |
| GDA_CONNECTION_FEATURE_SQL, | | GDA_CONNECTION_FEATURE_SQL, | |
| GDA_CONNECTION_FEATURE_TRANSACTIONS, | | GDA_CONNECTION_FEATURE_TRANSACTIONS, | |
| GDA_CONNECTION_FEATURE_SAVEPOINTS, | | GDA_CONNECTION_FEATURE_SAVEPOINTS, | |
| GDA_CONNECTION_FEATURE_SAVEPOINTS_REMOVE, | | GDA_CONNECTION_FEATURE_SAVEPOINTS_REMOVE, | |
| GDA_CONNECTION_FEATURE_TRIGGERS, | | GDA_CONNECTION_FEATURE_TRIGGERS, | |
| GDA_CONNECTION_FEATURE_UPDATABLE_CURSOR, | | GDA_CONNECTION_FEATURE_UPDATABLE_CURSOR, | |
| GDA_CONNECTION_FEATURE_USERS, | | GDA_CONNECTION_FEATURE_USERS, | |
| GDA_CONNECTION_FEATURE_VIEWS, | | GDA_CONNECTION_FEATURE_VIEWS, | |
| GDA_CONNECTION_FEATURE_XA_TRANSACTIONS, | | GDA_CONNECTION_FEATURE_XA_TRANSACTIONS, | |
| | | | |
|
| | | GDA_CONNECTION_FEATURE_MULTI_THREADING, | |
| | | | |
| GDA_CONNECTION_FEATURE_LAST | | GDA_CONNECTION_FEATURE_LAST | |
| } GdaConnectionFeature; | | } GdaConnectionFeature; | |
| | | | |
|
| | | /** | |
| | | * GdaConnectionSchema | |
| | | * | |
| | | * Deprecated: 4.2: This was a leftover from the pre 4.0 area | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| GDA_CONNECTION_SCHEMA_AGGREGATES, | | GDA_CONNECTION_SCHEMA_AGGREGATES, | |
| GDA_CONNECTION_SCHEMA_DATABASES, | | GDA_CONNECTION_SCHEMA_DATABASES, | |
| GDA_CONNECTION_SCHEMA_FIELDS, | | GDA_CONNECTION_SCHEMA_FIELDS, | |
| GDA_CONNECTION_SCHEMA_INDEXES, | | GDA_CONNECTION_SCHEMA_INDEXES, | |
| GDA_CONNECTION_SCHEMA_LANGUAGES, | | GDA_CONNECTION_SCHEMA_LANGUAGES, | |
| GDA_CONNECTION_SCHEMA_NAMESPACES, | | GDA_CONNECTION_SCHEMA_NAMESPACES, | |
| GDA_CONNECTION_SCHEMA_PARENT_TABLES, | | GDA_CONNECTION_SCHEMA_PARENT_TABLES, | |
| GDA_CONNECTION_SCHEMA_PROCEDURES, | | GDA_CONNECTION_SCHEMA_PROCEDURES, | |
| GDA_CONNECTION_SCHEMA_SEQUENCES, | | GDA_CONNECTION_SCHEMA_SEQUENCES, | |
| | | | |
End of changes. 10 change blocks. |
| 7 lines changed or deleted | | 80 lines changed or added | |
|
| gda-easy.h | | gda-easy.h | |
| /* GDA library | | /* GDA library | |
|
| * Copyright (C) 2008 The GNOME Foundation. | | * Copyright (C) 2008 - 2010 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Vivien Malerba <malerba@gnome-db.org> | | * Vivien Malerba <malerba@gnome-db.org> | |
| * Daniel Espinosa <esodan@gmail.com> | | * Daniel Espinosa <esodan@gmail.com> | |
| * | | * | |
| * This Library is free software; you can redistribute it and/or | | * This Library is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Library General Public License as | | * modify it under the terms of the GNU Library General Public License as | |
| * published by the Free Software Foundation; either version 2 of the | | * published by the Free Software Foundation; either version 2 of the | |
| * License, or (at your option) any later version. | | * License, or (at your option) any later version. | |
| * | | * | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 63 | |
| GDA_EASY_CREATE_TABLE_AUTOINC_FLAG = 1 << 4, | | GDA_EASY_CREATE_TABLE_AUTOINC_FLAG = 1 << 4, | |
| GDA_EASY_CREATE_TABLE_FKEY_FLAG = 1 << 5, | | GDA_EASY_CREATE_TABLE_FKEY_FLAG = 1 << 5, | |
| /* Flags combinations */ | | /* Flags combinations */ | |
| GDA_EASY_CREATE_TABLE_PKEY_AUTOINC_FLAG = GDA_EASY_CREATE_TABLE_PKEY
_FLAG | GDA_EASY_CREATE_TABLE_AUTOINC_FLAG | | GDA_EASY_CREATE_TABLE_PKEY_AUTOINC_FLAG = GDA_EASY_CREATE_TABLE_PKEY
_FLAG | GDA_EASY_CREATE_TABLE_AUTOINC_FLAG | |
| } GdaEasyCreateTableFlag; | | } GdaEasyCreateTableFlag; | |
| | | | |
| /* | | /* | |
| * Convenient Functions | | * Convenient Functions | |
| */ | | */ | |
| GdaDataHandler *gda_get_default_handler (GType for_type); | | GdaDataHandler *gda_get_default_handler (GType for_type); | |
|
| | | GdaStatement *gda_parse_sql_string (GdaConnection *cnc, | |
| | | const gchar *sql, GdaSet **params, | |
| | | | |
| | | GError **error); | |
| /* | | /* | |
| * Quick commands execution | | * Quick commands execution | |
| */ | | */ | |
| GdaDataModel* gda_execute_select_command (GdaConnection *cnc,
const gchar *sql, GError **error); | | GdaDataModel* gda_execute_select_command (GdaConnection *cnc,
const gchar *sql, GError **error); | |
| gint gda_execute_non_select_command (GdaConnection *cnc,
const gchar *sql, GError **error); | | gint gda_execute_non_select_command (GdaConnection *cnc,
const gchar *sql, GError **error); | |
| | | | |
| /* | | /* | |
| * Database creation and destruction | | * Database creation and destruction | |
| */ | | */ | |
| GdaServerOperation *gda_prepare_create_database (const gchar *provide
r, const gchar *db_name, GError **error); | | GdaServerOperation *gda_prepare_create_database (const gchar *provide
r, const gchar *db_name, GError **error); | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 5 lines changed or added | |
|
| gda-sql-builder.h | | gda-sql-builder.h | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| GObjectClass parent_class; | | GObjectClass parent_class; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| void (*_gda_reserved1) (void); | | void (*_gda_reserved1) (void); | |
| void (*_gda_reserved2) (void); | | void (*_gda_reserved2) (void); | |
| void (*_gda_reserved3) (void); | | void (*_gda_reserved3) (void); | |
| void (*_gda_reserved4) (void); | | void (*_gda_reserved4) (void); | |
| }; | | }; | |
| | | | |
|
| | | typedef guint GdaSqlBuilderId; | |
| | | | |
| GType gda_sql_builder_get_type (void) G_GNUC_CONST; | | GType gda_sql_builder_get_type (void) G_GNUC_CONST; | |
| GdaSqlBuilder *gda_sql_builder_new (GdaSqlStatementType stmt_
type); | | GdaSqlBuilder *gda_sql_builder_new (GdaSqlStatementType stmt_
type); | |
| GdaStatement *gda_sql_builder_get_statement (GdaSqlBuilder *builder, GE
rror **error); | | GdaStatement *gda_sql_builder_get_statement (GdaSqlBuilder *builder, GE
rror **error); | |
| GdaSqlStatement *gda_sql_builder_get_sql_statement (GdaSqlBuilder *builder
); | | GdaSqlStatement *gda_sql_builder_get_sql_statement (GdaSqlBuilder *builder
); | |
| | | | |
| /* Expression API */ | | /* Expression API */ | |
|
| guint gda_sql_builder_add_id (GdaSqlBuilder *builder, const gch | | GdaSqlBuilderId gda_sql_builder_add_id (GdaSqlBuilder *builder, const gchar | |
| ar *string); | | *string); | |
| guint gda_sql_builder_add_expr (GdaSqlBuilder *builder, GdaData | | GdaSqlBuilderId gda_sql_builder_add_field_id (GdaSqlBuilder *builder, const | |
| Handler *dh, GType type, ...); | | gchar *field_name, const gchar *table_name); | |
| guint gda_sql_builder_add_expr_value (GdaSqlBuilder *builder, G | | GdaSqlBuilderId gda_sql_builder_add_expr (GdaSqlBuilder *builder, GdaDataHa | |
| daDataHandler *dh, const GValue *value); | | ndler *dh, GType type, ...); | |
| guint gda_sql_builder_add_param (GdaSqlBuilder *builder, const | | GdaSqlBuilderId gda_sql_builder_add_expr_value (GdaSqlBuilder *builder, Gda | |
| gchar *param_name, GType type, gboolean nullok); | | DataHandler *dh, const GValue *value); | |
| | | GdaSqlBuilderId gda_sql_builder_add_param (GdaSqlBuilder *builder, const gc | |
| | | har *param_name, GType type, gboolean nullok); | |
| | | | |
|
| guint gda_sql_builder_add_cond (GdaSqlBuilder *builder, GdaSqlO | | GdaSqlBuilderId gda_sql_builder_add_cond (GdaSqlBuilder *builder, GdaSqlOpe | |
| peratorType op, | | ratorType op, | |
| guint op1, guint op2, guint op3) | | GdaSqlBuilderId op1, GdaSqlBuild | |
| ; | | erId op2, GdaSqlBuilderId op3); | |
| guint gda_sql_builder_add_cond_v (GdaSqlBuilder *builder, GdaSq | | GdaSqlBuilderId gda_sql_builder_add_cond_v (GdaSqlBuilder *builder, GdaSqlO | |
| lOperatorType op, | | peratorType op, | |
| const guint *op_ids, gint op_i | | const GdaSqlBuilderId *op_ids, | |
| ds_size); | | gint op_ids_size); | |
| guint gda_sql_builder_add_function (GdaSqlBuilder *builder, con | | GdaSqlBuilderId gda_sql_builder_add_function (GdaSqlBuilder *builder, const | |
| st gchar *func_name, ...); | | gchar *func_name, ...); | |
| guint gda_sql_builder_add_function_v (GdaSqlBuilder *builder, c | | GdaSqlBuilderId gda_sql_builder_add_function_v (GdaSqlBuilder *builder, con | |
| onst gchar *func_name, | | st gchar *func_name, | |
| const guint *args, gint ar | | const GdaSqlBuilderId *arg | |
| gs_size); | | s, gint args_size); | |
| guint gda_sql_builder_add_sub_select (GdaSqlBuilder *builder, G | | GdaSqlBuilderId gda_sql_builder_add_sub_select (GdaSqlBuilder *builder, Gda | |
| daSqlStatement *sqlst); | | SqlStatement *sqlst); | |
| guint gda_sql_builder_add_case (GdaSqlBuilder *builder, guint t | | GdaSqlBuilderId gda_sql_builder_add_case (GdaSqlBuilder *builder, GdaSqlBui | |
| est_expr, guint else_expr, ...); | | lderId test_expr, GdaSqlBuilderId else_expr, ...); | |
| guint gda_sql_builder_add_case_v (GdaSqlBuilder *builder, guint | | GdaSqlBuilderId gda_sql_builder_add_case_v (GdaSqlBuilder *builder, GdaSqlB | |
| test_expr, guint else_expr, | | uilderId test_expr, GdaSqlBuilderId else_expr, | |
| const guint *when_array, const | | const GdaSqlBuilderId *when_ar | |
| guint *then_array, gint args_size); | | ray, const GdaSqlBuilderId *then_array, gint args_size); | |
| | | | |
| /* General Statement API */ | | /* General Statement API */ | |
|
| void gda_sql_builder_add_field (GdaSqlBuilder *builder, const | | void gda_sql_builder_add_field_value (GdaSqlBuilder *builder, | |
| gchar *field_name, GType type, ...); | | const gchar *field_name, GType type, ...); | |
| void gda_sql_builder_add_field_value (GdaSqlBuilder *builder, | | void gda_sql_builder_add_field_value_as_gvalue (GdaSqlBuilder | |
| const gchar *field_name, | | *builder, const gchar *field_name, | |
| const GValue *value); | | const GValue *value); | |
|
| | | void gda_sql_builder_add_field_value_id (GdaSqlBuilder *builde
r, GdaSqlBuilderId field_id, GdaSqlBuilderId value_id); | |
| | | | |
| void gda_sql_builder_set_table (GdaSqlBuilder *builder, const
gchar *table_name); | | void gda_sql_builder_set_table (GdaSqlBuilder *builder, const
gchar *table_name); | |
|
| void gda_sql_builder_set_where (GdaSqlBuilder *builder, guint | | void gda_sql_builder_set_where (GdaSqlBuilder *builder, GdaSql | |
| cond_id); | | BuilderId cond_id); | |
| | | | |
| void gda_sql_builder_add_field_id (GdaSqlBuilder *builder, gui | | | |
| nt field_id, guint value_id); | | | |
| | | | |
| /* SELECT Statement API */ | | /* SELECT Statement API */ | |
|
| guint gda_sql_builder_select_add_field (GdaSqlBuilder *builder,
const gchar *field_name, | | GdaSqlBuilderId gda_sql_builder_select_add_field (GdaSqlBuilder *builder, c
onst gchar *field_name, | |
| const gchar *table_name,
const gchar *alias); | | const gchar *table_name,
const gchar *alias); | |
|
| guint gda_sql_builder_select_add_target (GdaSqlBuilder *builder | | GdaSqlBuilderId gda_sql_builder_select_add_target (GdaSqlBuilder *builder, | |
| , const gchar *table_name, const gchar *alias); | | const gchar *table_name, const gchar *alias); | |
| guint gda_sql_builder_select_add_target_id (GdaSqlBuilder *buil | | GdaSqlBuilderId gda_sql_builder_select_add_target_id (GdaSqlBuilder *builde | |
| der, guint table_id, const gchar *alias); | | r, GdaSqlBuilderId table_id, const gchar *alias); | |
| guint gda_sql_builder_select_join_targets (GdaSqlBuilder *build | | GdaSqlBuilderId gda_sql_builder_select_join_targets (GdaSqlBuilder *builder | |
| er, | | , | |
| guint left_target_id, | | GdaSqlBuilderId left_ | |
| guint right_target_id, | | target_id, GdaSqlBuilderId right_target_id, | |
| GdaSqlSelectJoinType
join_type, | | GdaSqlSelectJoinType
join_type, | |
|
| guint join_expr); | | GdaSqlBuilderId join_ | |
| void gda_sql_builder_join_add_field (GdaSqlBuilder *builder, g | | expr); | |
| uint join_id, const gchar *field_name); | | void gda_sql_builder_join_add_field (GdaSqlBuilder *builder, G | |
| void gda_sql_builder_select_order_by (GdaSqlBuilder *builder, | | daSqlBuilderId join_id, const gchar *field_name); | |
| guint expr_id, | | void gda_sql_builder_select_order_by (GdaSqlBuilder *builder, | |
| | | GdaSqlBuilderId expr_id, | |
| gboolean asc, const gchar
*collation_name); | | gboolean asc, const gchar
*collation_name); | |
| void gda_sql_builder_select_set_distinct (GdaSqlBuilder *build
er, | | void gda_sql_builder_select_set_distinct (GdaSqlBuilder *build
er, | |
|
| gboolean distinct, gu
int expr_id); | | gboolean distinct, Gd
aSqlBuilderId expr_id); | |
| void gda_sql_builder_select_set_limit (GdaSqlBuilder *builder, | | void gda_sql_builder_select_set_limit (GdaSqlBuilder *builder, | |
|
| guint limit_count_expr_i
d, guint limit_offest_expr_id); | | GdaSqlBuilderId limit_co
unt_expr_id, GdaSqlBuilderId limit_offest_expr_id); | |
| | | | |
|
| void gda_sql_builder_select_set_having (GdaSqlBuilder *builder | | void gda_sql_builder_select_set_having (GdaSqlBuilder *builder | |
| , guint cond_id); | | , GdaSqlBuilderId cond_id); | |
| void gda_sql_builder_select_group_by (GdaSqlBuilder *builder, | | void gda_sql_builder_select_group_by (GdaSqlBuilder *builder, | |
| guint expr_id); | | GdaSqlBuilderId expr_id); | |
| | | | |
| /* COMPOUND SELECT Statement API */ | | /* COMPOUND SELECT Statement API */ | |
| void gda_sql_builder_compound_set_type (GdaSqlBuilder *builder
, GdaSqlStatementCompoundType compound_type); | | void gda_sql_builder_compound_set_type (GdaSqlBuilder *builder
, GdaSqlStatementCompoundType compound_type); | |
| void gda_sql_builder_compound_add_sub_select (GdaSqlBuilder *b
uilder, GdaSqlStatement *sqlst); | | void gda_sql_builder_compound_add_sub_select (GdaSqlBuilder *b
uilder, GdaSqlStatement *sqlst); | |
| | | | |
| /* import/Export API */ | | /* import/Export API */ | |
|
| GdaSqlExpr *gda_sql_builder_export_expression (GdaSqlBuilder *builder | | GdaSqlExpr *gda_sql_builder_export_expression (GdaSqlBuilder *builder | |
| , guint id); | | , GdaSqlBuilderId id); | |
| guint gda_sql_builder_import_expression (GdaSqlBuilder *builder | | GdaSqlBuilderId gda_sql_builder_import_expression (GdaSqlBuilder *builder, | |
| , GdaSqlExpr *expr); | | GdaSqlExpr *expr); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 63 lines changed or deleted | | 66 lines changed or added | |
|