| gda-meta-struct.h | | gda-meta-struct.h | |
| | | | |
| skipping to change at line 43 | | skipping to change at line 43 | |
| #define GDA_META_STRUCT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gda_m
eta_struct_get_type (), GdaMetaStructClass) | | #define GDA_META_STRUCT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gda_m
eta_struct_get_type (), GdaMetaStructClass) | |
| #define GDA_IS_META_STRUCT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gda_
meta_struct_get_type ()) | | #define GDA_IS_META_STRUCT(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gda_
meta_struct_get_type ()) | |
| | | | |
| /* error reporting */ | | /* error reporting */ | |
| extern GQuark gda_meta_struct_error_quark (void); | | extern GQuark gda_meta_struct_error_quark (void); | |
| #define GDA_META_STRUCT_ERROR gda_meta_struct_error_quark () | | #define GDA_META_STRUCT_ERROR gda_meta_struct_error_quark () | |
| | | | |
| typedef enum { | | typedef enum { | |
| GDA_META_STRUCT_UNKNOWN_OBJECT_ERROR, | | GDA_META_STRUCT_UNKNOWN_OBJECT_ERROR, | |
| GDA_META_STRUCT_DUPLICATE_OBJECT_ERROR, | | GDA_META_STRUCT_DUPLICATE_OBJECT_ERROR, | |
|
| GDA_META_STRUCT_INCOHERENCE_ERROR | | GDA_META_STRUCT_INCOHERENCE_ERROR, | |
| | | GDA_META_STRUCT_XML_ERROR | |
| } GdaMetaStructError; | | } GdaMetaStructError; | |
| | | | |
| /* struct for the object's data */ | | /* struct for the object's data */ | |
| struct _GdaMetaStruct | | struct _GdaMetaStruct | |
| { | | { | |
| GObject object; | | GObject object; | |
| GdaMetaStructPrivate *priv; | | GdaMetaStructPrivate *priv; | |
| }; | | }; | |
| | | | |
| /* struct for the object's class */ | | /* struct for the object's class */ | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 107 | |
| * | | * | |
| * Types of sorting | | * Types of sorting | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
| GDA_META_SORT_ALHAPETICAL, | | GDA_META_SORT_ALHAPETICAL, | |
| GDA_META_SORT_DEPENDENCIES | | GDA_META_SORT_DEPENDENCIES | |
| } GdaMetaSortType; | | } GdaMetaSortType; | |
| | | | |
| /** | | /** | |
| * GdaMetaTable: | | * GdaMetaTable: | |
|
| * @columns: list of #GdaMetaTableColumn structures, one for each column in
the table | | * @columns: (element-type Gda.MetaTableColumn): list of #GdaMetaTableColum
n structures, one for each column in the table | |
| * @pk_cols_array: index of the columns part of the primary key for the tab
le (WARNING: columns numbering | | * @pk_cols_array: index of the columns part of the primary key for the tab
le (WARNING: columns numbering | |
| * here start at 0) | | * here start at 0) | |
| * @pk_cols_nb: size of the @pk_cols_array array | | * @pk_cols_nb: size of the @pk_cols_array array | |
|
| * @reverse_fk_list: list of #GdaMetaTableForeignKey where the referenced t | | * @reverse_fk_list: (element-type Gda.MetaTableForeignKey): list of #GdaMe | |
| able is this table | | taTableForeignKey where the referenced table is this table | |
| * @fk_list: list of #GdaMetaTableForeignKey for this table | | * @fk_list: (element-type Gda.MetaTableForeignKey): list of #GdaMetaTableF | |
| | | oreignKey for this table | |
| * | | * | |
| * This structure specifies a #GdaMetaDbObject to represent a table's speci
fic attributes, | | * This structure specifies a #GdaMetaDbObject to represent a table's speci
fic attributes, | |
| * its contents must not be modified. | | * its contents must not be modified. | |
|
| | | * | |
| | | * Note that in some cases, the columns cannot be determined for views, and | |
| | | in this case the | |
| | | * @columns will be %NULL (this can be the case for example with SQLite whe | |
| | | re a view | |
| | | * uses a function which is not natively provided by SQLite. | |
| */ | | */ | |
| typedef struct { | | typedef struct { | |
| /*< public >*/ | | /*< public >*/ | |
| GSList *columns; | | GSList *columns; | |
| | | | |
| /* PK fields index */ | | /* PK fields index */ | |
| gint *pk_cols_array; | | gint *pk_cols_array; | |
| gint pk_cols_nb; | | gint pk_cols_nb; | |
| | | | |
| /* Foreign keys */ | | /* Foreign keys */ | |
| | | | |
| skipping to change at line 170 | | skipping to change at line 175 | |
| * GdaMetaDbObject: | | * GdaMetaDbObject: | |
| * @extra: union for the actual object's contents, to be able to cast it us
ing GDA_META_TABLE(), GDA_META_VIEW() | | * @extra: union for the actual object's contents, to be able to cast it us
ing GDA_META_TABLE(), GDA_META_VIEW() | |
| * @obj_type: the type of object (table, view) | | * @obj_type: the type of object (table, view) | |
| * @outdated: set to %TRUE if the information in this #GdaMetaDbObject may
be outdated because the #GdaMetaStore has been updated | | * @outdated: set to %TRUE if the information in this #GdaMetaDbObject may
be outdated because the #GdaMetaStore has been updated | |
| * @obj_catalog: the catalog the object is in | | * @obj_catalog: the catalog the object is in | |
| * @obj_schema: the schema the object is in | | * @obj_schema: the schema the object is in | |
| * @obj_name: the object's name | | * @obj_name: the object's name | |
| * @obj_short_name: the shortest way to name the object | | * @obj_short_name: the shortest way to name the object | |
| * @obj_full_name: the full name of the object (in the <schema>.<n
ameagt; notation | | * @obj_full_name: the full name of the object (in the <schema>.<n
ameagt; notation | |
| * @obj_owner: object's owner | | * @obj_owner: object's owner | |
|
| * @depend_list: list of #GdaMetaDbObject pointers on which this object dep
ends (through foreign keys | | * @depend_list: (element-type Gda.MetaDbObject): list of #GdaMetaDbObject
pointers on which this object depends (through foreign keys | |
| * or tables used for views) | | * or tables used for views) | |
| * | | * | |
| * Struture to hold information about each database object (tables, views,
...), | | * Struture to hold information about each database object (tables, views,
...), | |
| * its contents must not be modified. | | * its contents must not be modified. | |
| * | | * | |
| * Note: @obj_catalog, @obj_schema, @obj_name, @obj_short_name and @obj_ful
l_name respect the | | * Note: @obj_catalog, @obj_schema, @obj_name, @obj_short_name and @obj_ful
l_name respect the | |
| * <link linkend="information_schema:sql_identifiers">SQL identifiers</link
> convention used in | | * <link linkend="information_schema:sql_identifiers">SQL identifiers</link
> convention used in | |
| * #GdaMetaStore objects. Before using these SQL identifiers, you should ch
eck the | | * #GdaMetaStore objects. Before using these SQL identifiers, you should ch
eck the | |
| * gda_sql_identifier_quote() to know if is it is necessary to surround by
double quotes | | * gda_sql_identifier_quote() to know if is it is necessary to surround by
double quotes | |
| * before using in an SQL statement. | | * before using in an SQL statement. | |
| | | | |
End of changes. 5 change blocks. |
| 6 lines changed or deleted | | 14 lines changed or added | |
|
| gda-server-provider.h | | gda-server-provider.h | |
| | | | |
| skipping to change at line 62 | | skipping to change at line 62 | |
| GDA_SERVER_PROVIDER_PREPARE_STMT_ERROR, | | GDA_SERVER_PROVIDER_PREPARE_STMT_ERROR, | |
| GDA_SERVER_PROVIDER_EMPTY_STMT_ERROR, | | GDA_SERVER_PROVIDER_EMPTY_STMT_ERROR, | |
| GDA_SERVER_PROVIDER_MISSING_PARAM_ERROR, | | GDA_SERVER_PROVIDER_MISSING_PARAM_ERROR, | |
| GDA_SERVER_PROVIDER_STATEMENT_EXEC_ERROR, | | GDA_SERVER_PROVIDER_STATEMENT_EXEC_ERROR, | |
| GDA_SERVER_PROVIDER_OPERATION_ERROR, | | GDA_SERVER_PROVIDER_OPERATION_ERROR, | |
| GDA_SERVER_PROVIDER_INTERNAL_ERROR, | | GDA_SERVER_PROVIDER_INTERNAL_ERROR, | |
| GDA_SERVER_PROVIDER_BUSY_ERROR, | | GDA_SERVER_PROVIDER_BUSY_ERROR, | |
| GDA_SERVER_PROVIDER_NON_SUPPORTED_ERROR, | | GDA_SERVER_PROVIDER_NON_SUPPORTED_ERROR, | |
| GDA_SERVER_PROVIDER_SERVER_VERSION_ERROR, | | GDA_SERVER_PROVIDER_SERVER_VERSION_ERROR, | |
| GDA_SERVER_PROVIDER_DATA_ERROR, | | GDA_SERVER_PROVIDER_DATA_ERROR, | |
|
| GDA_SERVER_PROVIDER_DEFAULT_VALUE_HANDLING_ERROR | | GDA_SERVER_PROVIDER_DEFAULT_VALUE_HANDLING_ERROR, | |
| | | GDA_SERVER_PROVIDER_MISUSE_ERROR, | |
| | | GDA_SERVER_PROVIDER_FILE_NOT_FOUND_ERROR | |
| } GdaServerProviderError; | | } GdaServerProviderError; | |
| | | | |
| struct _GdaServerProvider { | | struct _GdaServerProvider { | |
| GObject object; | | GObject object; | |
| GdaServerProviderPrivate *priv; | | GdaServerProviderPrivate *priv; | |
| }; | | }; | |
| | | | |
| typedef struct { | | typedef struct { | |
| /* _information_schema_catalog_name */ | | /* _information_schema_catalog_name */ | |
| gboolean (*_info) (GdaServerProvider *, GdaConnection *,
GdaMetaStore *, GdaMetaContext *, GError **); | | gboolean (*_info) (GdaServerProvider *, GdaConnection *,
GdaMetaStore *, GdaMetaContext *, GError **); | |
| | | | |
| skipping to change at line 282 | | skipping to change at line 284 | |
| const gchar *name,
GError **error); | | const gchar *name,
GError **error); | |
| gboolean (* add_savepoint) (GdaServerProvider
*provider, GdaConnection *cnc, | | gboolean (* add_savepoint) (GdaServerProvider
*provider, GdaConnection *cnc, | |
| const gchar *name,
GError **error); | | const gchar *name,
GError **error); | |
| gboolean (* rollback_savepoint) (GdaServerProvider
*provider, GdaConnection *cnc, | | gboolean (* rollback_savepoint) (GdaServerProvider
*provider, GdaConnection *cnc, | |
| const gchar *name,
GError **error); | | const gchar *name,
GError **error); | |
| gboolean (* delete_savepoint) (GdaServerProvider
*provider, GdaConnection *cnc, | | gboolean (* delete_savepoint) (GdaServerProvider
*provider, GdaConnection *cnc, | |
| const gchar *name,
GError **error); | | const gchar *name,
GError **error); | |
| | | | |
| /* GdaStatement */ | | /* GdaStatement */ | |
| GdaSqlParser *(* create_parser) (GdaServerProvider
*provider, GdaConnection *cnc); | | GdaSqlParser *(* create_parser) (GdaServerProvider
*provider, GdaConnection *cnc); | |
|
| | | | |
| | | /** | |
| | | * statement_to_sql: | |
| | | * @cnc: a #GdaConnection object | |
| | | * @stmt: a #GdaStatement object | |
| | | * @params: (allow-none): a #GdaSet object (which can be obtained us | |
| | | ing gda_statement_get_parameters()), or %NULL | |
| | | * @flags: SQL rendering flags, as #GdaStatementSqlFlag OR'ed values | |
| | | * @params_used: (allow-none) (element-type Gda.Holder) (out) (trans | |
| | | fer container): a place to store the list of individual #GdaHolder objects | |
| | | within @params which have been used | |
| | | * @error: a place to store errors, or %NULL | |
| | | * | |
| | | * Renders @stmt as an SQL statement, adapted to the SQL dialect use | |
| | | d by @cnc | |
| | | * | |
| | | * Returns: a new string, or %NULL if an error occurred | |
| | | */ | |
| gchar *(* statement_to_sql) (GdaServerProvider
*provider, GdaConnection *cnc, | | gchar *(* statement_to_sql) (GdaServerProvider
*provider, GdaConnection *cnc, | |
| GdaStatement *stmt
, GdaSet *params, GdaStatementSqlFlag flags, | | GdaStatement *stmt
, GdaSet *params, GdaStatementSqlFlag flags, | |
| GSList **params_us
ed, GError **error); | | GSList **params_us
ed, GError **error); | |
| gboolean (* statement_prepare) (GdaServerProvider
*provider, GdaConnection *cnc, | | gboolean (* statement_prepare) (GdaServerProvider
*provider, GdaConnection *cnc, | |
| GdaStatement *stmt
, GError **error); | | GdaStatement *stmt
, GError **error); | |
| GObject *(* statement_execute) (GdaServerProvider
*provider, GdaConnection *cnc, | | GObject *(* statement_execute) (GdaServerProvider
*provider, GdaConnection *cnc, | |
| GdaStatement *stmt
, GdaSet *params, | | GdaStatement *stmt
, GdaSet *params, | |
| GdaStatementModelU
sage model_usage, | | GdaStatementModelU
sage model_usage, | |
| GType *col_types,
GdaSet **last_inserted_row, | | GType *col_types,
GdaSet **last_inserted_row, | |
| guint *task_id, Gd
aServerProviderExecCallback exec_cb, | | guint *task_id, Gd
aServerProviderExecCallback exec_cb, | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 21 lines changed or added | |
|
| gda-statement-struct-decl.h | | gda-statement-struct-decl.h | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 36 | |
| #include <libgda/gda-decl.h> | | #include <libgda/gda-decl.h> | |
| #include <libgda/gda-meta-store.h> | | #include <libgda/gda-meta-store.h> | |
| #include <libgda/gda-meta-struct.h> | | #include <libgda/gda-meta-struct.h> | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| /* error reporting */ | | /* error reporting */ | |
| extern GQuark gda_sql_error_quark (void); | | extern GQuark gda_sql_error_quark (void); | |
| #define GDA_SQL_ERROR gda_sql_error_quark () | | #define GDA_SQL_ERROR gda_sql_error_quark () | |
| | | | |
|
| | | /* | |
| | | * GdaSqlError: (skip) | |
| | | * | |
| | | **/ | |
| typedef enum { | | typedef enum { | |
| GDA_SQL_STRUCTURE_CONTENTS_ERROR, | | GDA_SQL_STRUCTURE_CONTENTS_ERROR, | |
| GDA_SQL_MALFORMED_IDENTIFIER_ERROR, | | GDA_SQL_MALFORMED_IDENTIFIER_ERROR, | |
| GDA_SQL_MISSING_IDENTIFIER_ERROR, | | GDA_SQL_MISSING_IDENTIFIER_ERROR, | |
| GDA_SQL_VALIDATION_ERROR | | GDA_SQL_VALIDATION_ERROR | |
| } GdaSqlError; | | } GdaSqlError; | |
|
| | | /* | |
| | | * GdaSqlErrorType: (skip) | |
| | | * | |
| | | **/ | |
| typedef GdaSqlError GdaSqlErrorType; | | typedef GdaSqlError GdaSqlErrorType; | |
| | | | |
| /* | | /* | |
| * Struct declarations | | * Struct declarations | |
| */ | | */ | |
|
| | | /* | |
| | | * GdaSqlAnyPart: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlAnyPart GdaSqlAnyPart; | | typedef struct _GdaSqlAnyPart GdaSqlAnyPart; | |
|
| | | /* | |
| | | * GdaSqlStatement: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatement GdaSqlStatement; | | typedef struct _GdaSqlStatement GdaSqlStatement; | |
|
| | | /* | |
| | | * GdaSqlStatementUnknown: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatementUnknown GdaSqlStatementUnknown; | | typedef struct _GdaSqlStatementUnknown GdaSqlStatementUnknown; | |
|
| | | /* | |
| | | * GdaSqlStatementTransaction: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatementTransaction GdaSqlStatementTransaction; | | typedef struct _GdaSqlStatementTransaction GdaSqlStatementTransaction; | |
|
| | | /* | |
| | | * GdaSqlStatementSelect: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatementSelect GdaSqlStatementSelect; | | typedef struct _GdaSqlStatementSelect GdaSqlStatementSelect; | |
|
| | | /* | |
| | | * GdaSqlStatementInsert: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatementInsert GdaSqlStatementInsert; | | typedef struct _GdaSqlStatementInsert GdaSqlStatementInsert; | |
|
| | | /* | |
| | | * GdaSqlStatementDelete: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatementDelete GdaSqlStatementDelete; | | typedef struct _GdaSqlStatementDelete GdaSqlStatementDelete; | |
|
| | | /* | |
| | | * GdaSqlStatementUpdate: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatementUpdate GdaSqlStatementUpdate; | | typedef struct _GdaSqlStatementUpdate GdaSqlStatementUpdate; | |
|
| | | /* | |
| | | * GdaSqlStatementCompound: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlStatementCompound GdaSqlStatementCompound; | | typedef struct _GdaSqlStatementCompound GdaSqlStatementCompound; | |
| | | | |
| /* | | /* | |
| * Statement type | | * Statement type | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlStatementType: | |
| | | * @GDA_SQL_STATEMENT_SELECT: a SELECT statement | |
| | | * @GDA_SQL_STATEMENT_INSERT: an INSERT statement | |
| | | * @GDA_SQL_STATEMENT_UPDATE: an UPDATE statement | |
| | | * @GDA_SQL_STATEMENT_DELETE: a DELETE statement | |
| | | * @GDA_SQL_STATEMENT_COMPOUND: a compound statement: multiple SELECT state | |
| | | ments grouped together using an operator | |
| | | * @GDA_SQL_STATEMENT_BEGIN: start of transaction statement | |
| | | * @GDA_SQL_STATEMENT_ROLLBACK: transaction abort statement | |
| | | * @GDA_SQL_STATEMENT_COMMIT: transaction commit statement | |
| | | * @GDA_SQL_STATEMENT_SAVEPOINT: new savepoint definition statement | |
| | | * @GDA_SQL_STATEMENT_ROLLBACK_SAVEPOINT: return to savepoint statement | |
| | | * @GDA_SQL_STATEMENT_DELETE_SAVEPOINT: savepoint deletion statement | |
| | | * @GDA_SQL_STATEMENT_UNKNOWN: unknown statement, only identifies variables | |
| | | * @GDA_SQL_STATEMENT_NONE: not used | |
| | | * | |
| | | * Known types of statements | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| GDA_SQL_STATEMENT_SELECT, | | GDA_SQL_STATEMENT_SELECT, | |
| GDA_SQL_STATEMENT_INSERT, | | GDA_SQL_STATEMENT_INSERT, | |
| GDA_SQL_STATEMENT_UPDATE, | | GDA_SQL_STATEMENT_UPDATE, | |
| GDA_SQL_STATEMENT_DELETE, | | GDA_SQL_STATEMENT_DELETE, | |
| GDA_SQL_STATEMENT_COMPOUND, | | GDA_SQL_STATEMENT_COMPOUND, | |
| | | | |
| GDA_SQL_STATEMENT_BEGIN, | | GDA_SQL_STATEMENT_BEGIN, | |
| GDA_SQL_STATEMENT_ROLLBACK, | | GDA_SQL_STATEMENT_ROLLBACK, | |
| GDA_SQL_STATEMENT_COMMIT, | | GDA_SQL_STATEMENT_COMMIT, | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 144 | |
| GDA_SQL_STATEMENT_ROLLBACK_SAVEPOINT, | | GDA_SQL_STATEMENT_ROLLBACK_SAVEPOINT, | |
| GDA_SQL_STATEMENT_DELETE_SAVEPOINT, | | GDA_SQL_STATEMENT_DELETE_SAVEPOINT, | |
| | | | |
| GDA_SQL_STATEMENT_UNKNOWN, | | GDA_SQL_STATEMENT_UNKNOWN, | |
| GDA_SQL_STATEMENT_NONE | | GDA_SQL_STATEMENT_NONE | |
| } GdaSqlStatementType; | | } GdaSqlStatementType; | |
| | | | |
| /* | | /* | |
| * Structures identification | | * Structures identification | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlAnyPartType: (skip) | |
| | | * @GDA_SQL_ANY_STMT_SELECT: structure is a #GdaSqlStatementSelect | |
| | | * @GDA_SQL_ANY_STMT_INSERT: structure is a #GdaSqlStatementInsert | |
| | | * @GDA_SQL_ANY_STMT_UPDATE: structure is a #GdaSqlStatementUpdate | |
| | | * @GDA_SQL_ANY_STMT_DELETE: structure is a #GdaSqlStatementDelete | |
| | | * @GDA_SQL_ANY_STMT_COMPOUND: structure is a #GdaSqlStatementCompound | |
| | | * @GDA_SQL_ANY_STMT_BEGIN: structure is a #GdaSqlStatementTransaction | |
| | | * @GDA_SQL_ANY_STMT_ROLLBACK: structure is a #GdaSqlStatementTransaction | |
| | | * @GDA_SQL_ANY_STMT_COMMIT: structure is a #GdaSqlStatementTransaction | |
| | | * @GDA_SQL_ANY_STMT_SAVEPOINT: structure is a #GdaSqlStatementTransaction | |
| | | * @GDA_SQL_ANY_STMT_ROLLBACK_SAVEPOINT: structure is a #GdaSqlStatementTra | |
| | | nsaction | |
| | | * @GDA_SQL_ANY_STMT_DELETE_SAVEPOINT: structure is a #GdaSqlStatementTrans | |
| | | action | |
| | | * @GDA_SQL_ANY_STMT_UNKNOWN: structure is a #GdaSqlStatementUnknown | |
| | | * @GDA_SQL_ANY_EXPR: structure is a #GdaSqlExpr | |
| | | * @GDA_SQL_ANY_SQL_FIELD: structure is a #GdaSqlField | |
| | | * @GDA_SQL_ANY_SQL_TABLE: structure is a #GdaSqlTable | |
| | | * @GDA_SQL_ANY_SQL_FUNCTION: structure is a #GdaSqlFunction | |
| | | * @GDA_SQL_ANY_SQL_OPERATION: structure is a #GdaSqlOperation | |
| | | * @GDA_SQL_ANY_SQL_CASE: structure is a #GdaSqlCase | |
| | | * @GDA_SQL_ANY_SQL_SELECT_FIELD: structure is a #GdaSqlSelectField | |
| | | * @GDA_SQL_ANY_SQL_SELECT_TARGET: structure is a #GdaSqlSelectTarget | |
| | | * @GDA_SQL_ANY_SQL_SELECT_JOIN: structure is a #GdaSqlSelectJoin | |
| | | * @GDA_SQL_ANY_SQL_SELECT_FROM: structure is a #GdaSqlSelectFrom | |
| | | * @GDA_SQL_ANY_SQL_SELECT_ORDER: structure is a #GdaSqlSelectOrder | |
| | | * | |
| | | * Type of part. | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| /* complete statements */ | | /* complete statements */ | |
| GDA_SQL_ANY_STMT_SELECT = GDA_SQL_STATEMENT_SELECT, | | GDA_SQL_ANY_STMT_SELECT = GDA_SQL_STATEMENT_SELECT, | |
| GDA_SQL_ANY_STMT_INSERT = GDA_SQL_STATEMENT_INSERT, | | GDA_SQL_ANY_STMT_INSERT = GDA_SQL_STATEMENT_INSERT, | |
| GDA_SQL_ANY_STMT_UPDATE = GDA_SQL_STATEMENT_UPDATE, | | GDA_SQL_ANY_STMT_UPDATE = GDA_SQL_STATEMENT_UPDATE, | |
| GDA_SQL_ANY_STMT_DELETE = GDA_SQL_STATEMENT_DELETE, | | GDA_SQL_ANY_STMT_DELETE = GDA_SQL_STATEMENT_DELETE, | |
| GDA_SQL_ANY_STMT_COMPOUND = GDA_SQL_STATEMENT_COMPOUND, | | GDA_SQL_ANY_STMT_COMPOUND = GDA_SQL_STATEMENT_COMPOUND, | |
| GDA_SQL_ANY_STMT_BEGIN = GDA_SQL_STATEMENT_BEGIN, | | GDA_SQL_ANY_STMT_BEGIN = GDA_SQL_STATEMENT_BEGIN, | |
| GDA_SQL_ANY_STMT_ROLLBACK = GDA_SQL_STATEMENT_ROLLBACK, | | GDA_SQL_ANY_STMT_ROLLBACK = GDA_SQL_STATEMENT_ROLLBACK, | |
| GDA_SQL_ANY_STMT_COMMIT = GDA_SQL_STATEMENT_COMMIT, | | GDA_SQL_ANY_STMT_COMMIT = GDA_SQL_STATEMENT_COMMIT, | |
| | | | |
| skipping to change at line 111 | | skipping to change at line 201 | |
| GDA_SQL_ANY_SQL_FUNCTION, | | GDA_SQL_ANY_SQL_FUNCTION, | |
| GDA_SQL_ANY_SQL_OPERATION, | | GDA_SQL_ANY_SQL_OPERATION, | |
| GDA_SQL_ANY_SQL_CASE, | | GDA_SQL_ANY_SQL_CASE, | |
| GDA_SQL_ANY_SQL_SELECT_FIELD, | | GDA_SQL_ANY_SQL_SELECT_FIELD, | |
| GDA_SQL_ANY_SQL_SELECT_TARGET, | | GDA_SQL_ANY_SQL_SELECT_TARGET, | |
| GDA_SQL_ANY_SQL_SELECT_JOIN, | | GDA_SQL_ANY_SQL_SELECT_JOIN, | |
| GDA_SQL_ANY_SQL_SELECT_FROM, | | GDA_SQL_ANY_SQL_SELECT_FROM, | |
| GDA_SQL_ANY_SQL_SELECT_ORDER | | GDA_SQL_ANY_SQL_SELECT_ORDER | |
| } GdaSqlAnyPartType; | | } GdaSqlAnyPartType; | |
| | | | |
|
| | | /** | |
| | | * GdaSqlAnyPart: (skip) | |
| | | * @type: type of structure, as a #GdaSqlAnyPartType enum. | |
| | | * @parent: pointer to the parent #GdaSqlAnyPart structure | |
| | | * | |
| | | * Base structure of which all structures (except #GdaSqlStatement) "inheri | |
| | | t". | |
| | | * its type and its parent in the structure hierarchy. | |
| | | */ | |
| struct _GdaSqlAnyPart { | | struct _GdaSqlAnyPart { | |
| GdaSqlAnyPartType type; | | GdaSqlAnyPartType type; | |
| GdaSqlAnyPart *parent; | | GdaSqlAnyPart *parent; | |
| }; | | }; | |
| | | | |
| #define GDA_SQL_ANY_PART(x) ((GdaSqlAnyPart*)(x)) | | #define GDA_SQL_ANY_PART(x) ((GdaSqlAnyPart*)(x)) | |
| #define gda_sql_any_part_set_parent(a,p) \ | | #define gda_sql_any_part_set_parent(a,p) \ | |
| if (a) GDA_SQL_ANY_PART(a)->parent = GDA_SQL_ANY_PART(p) | | if (a) GDA_SQL_ANY_PART(a)->parent = GDA_SQL_ANY_PART(p) | |
| | | | |
| /* | | /* | |
| * Iteration | | * Iteration | |
| */ | | */ | |
| | | | |
| /* returns FALSE if a recursive walking should be stopped (mandatory is @er
ror is set) */ | | /* returns FALSE if a recursive walking should be stopped (mandatory is @er
ror is set) */ | |
|
| typedef gboolean (*GdaSqlForeachFunc) (GdaSqlAnyPart *, gpointer, GError ** | | /** | |
| ); | | * GdaSqlForeachFunc: (skip) | |
| | | * @part: the current #GdaSqlAnyPart node | |
| | | * @data: user data passed to gda_sql_any_part_foreach(). | |
| | | * @error: pointer to a place to store errors | |
| | | * @Returns: FALSE if the gda_sql_any_part_foreach() should stop at this po | |
| | | int and fail | |
| | | * | |
| | | * Specifies the type of functions passed to gda_sql_any_part_foreach(). | |
| | | */ | |
| | | typedef gboolean (*GdaSqlForeachFunc) (GdaSqlAnyPart *part, gpointer data, | |
| | | GError **error); | |
| | | | |
| gboolean gda_sql_any_part_foreach (GdaSqlAnyPart *node, GdaSqlForeachFunc f
unc, gpointer data, GError **error); | | gboolean gda_sql_any_part_foreach (GdaSqlAnyPart *node, GdaSqlForeachFunc f
unc, gpointer data, GError **error); | |
| | | | |
| /* | | /* | |
| * Structure validation | | * Structure validation | |
| */ | | */ | |
| gboolean gda_sql_any_part_check_structure (GdaSqlAnyPart *node, GError **er
ror); | | gboolean gda_sql_any_part_check_structure (GdaSqlAnyPart *node, GError **er
ror); | |
| | | | |
| /* | | /* | |
| * Contents' infos | | * Contents' infos | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlStatementContentsInfo: (skip) | |
| | | * | |
| | | */ | |
| typedef struct { | | typedef struct { | |
| GdaSqlStatementType type; | | GdaSqlStatementType type; | |
| gchar *name; | | gchar *name; | |
| gpointer (*construct) (void); | | gpointer (*construct) (void); | |
| void (*free) (gpointer); | | void (*free) (gpointer); | |
| gpointer (*copy) (gpointer); | | gpointer (*copy) (gpointer); | |
| gchar *(*serialize) (gpointer); | | gchar *(*serialize) (gpointer); | |
| | | | |
| /* augmenting information precision using a dictionary */ | | /* augmenting information precision using a dictionary */ | |
| GdaSqlForeachFunc check_structure_func; | | GdaSqlForeachFunc check_structure_func; | |
| | | | |
| skipping to change at line 159 | | skipping to change at line 270 | |
| /* 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; | |
| } GdaSqlStatementContentsInfo; | | } GdaSqlStatementContentsInfo; | |
| | | | |
| /* | | /* | |
| * Validation against a dictionary | | * Validation against a dictionary | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlStatementCheckValidityData: (skip) | |
| | | * | |
| | | * Validation against a dictionary | |
| | | */ | |
| typedef struct { | | typedef struct { | |
| GdaConnection *cnc; | | GdaConnection *cnc; | |
| GdaMetaStore *store; | | GdaMetaStore *store; | |
| GdaMetaStruct *mstruct; | | GdaMetaStruct *mstruct; | |
| | | | |
|
| | | /*< 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; | |
| } GdaSqlStatementCheckValidityData; | | } GdaSqlStatementCheckValidityData; | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 18 change blocks. |
| 3 lines changed or deleted | | 124 lines changed or added | |
|
| gda-statement-struct-parts.h | | gda-statement-struct-parts.h | |
| | | | |
| skipping to change at line 34 | | skipping to change at line 34 | |
| | | | |
| #include <glib.h> | | #include <glib.h> | |
| #include <glib-object.h> | | #include <glib-object.h> | |
| #include <sql-parser/gda-statement-struct.h> | | #include <sql-parser/gda-statement-struct.h> | |
| #include <sql-parser/gda-statement-struct-pspec.h> | | #include <sql-parser/gda-statement-struct-pspec.h> | |
| #include <sql-parser/gda-statement-struct-decl.h> | | #include <sql-parser/gda-statement-struct-decl.h> | |
| #include <libgda/gda-meta-struct.h> | | #include <libgda/gda-meta-struct.h> | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
|
| | | /* | |
| | | * GdaSqlExpr: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlExpr GdaSqlExpr; | | typedef struct _GdaSqlExpr GdaSqlExpr; | |
|
| | | /* | |
| | | * GdaSqlField: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlField GdaSqlField; | | typedef struct _GdaSqlField GdaSqlField; | |
|
| | | /* | |
| | | * GdaSqlTable: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlTable GdaSqlTable; | | typedef struct _GdaSqlTable GdaSqlTable; | |
|
| | | /* | |
| | | * GdaSqlFunction: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlFunction GdaSqlFunction; | | typedef struct _GdaSqlFunction GdaSqlFunction; | |
|
| | | /* | |
| | | * GdaSqlOperation: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlOperation GdaSqlOperation; | | typedef struct _GdaSqlOperation GdaSqlOperation; | |
|
| | | /* | |
| | | * GdaSqlCase: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlCase GdaSqlCase; | | typedef struct _GdaSqlCase GdaSqlCase; | |
|
| | | /* | |
| | | * GdaSqlSelectField: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlSelectField GdaSqlSelectField; | | typedef struct _GdaSqlSelectField GdaSqlSelectField; | |
|
| | | /* | |
| | | * GdaSqlSelectTarget: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlSelectTarget GdaSqlSelectTarget; | | typedef struct _GdaSqlSelectTarget GdaSqlSelectTarget; | |
|
| | | /* | |
| | | * GdaSqlSelectJoin: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlSelectJoin GdaSqlSelectJoin; | | typedef struct _GdaSqlSelectJoin GdaSqlSelectJoin; | |
|
| | | /* | |
| | | * GdaSqlSelectFrom: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlSelectFrom GdaSqlSelectFrom; | | typedef struct _GdaSqlSelectFrom GdaSqlSelectFrom; | |
|
| | | /* | |
| | | * GdaSqlSelectOrder: (skip) | |
| | | * | |
| | | **/ | |
| typedef struct _GdaSqlSelectOrder GdaSqlSelectOrder; | | typedef struct _GdaSqlSelectOrder GdaSqlSelectOrder; | |
| | | | |
| /* | | /* | |
| * Any Expression | | * Any Expression | |
| */ | | */ | |
| /** | | /** | |
|
| * GdaSqlExpr: | | * GdaSqlExpr: (skip) | |
| * @any: inheritance structure | | * @any: inheritance structure | |
| * @value: (allow-none): a #GValue, or %NULL. Please see specific note abou
t this field. | | * @value: (allow-none): a #GValue, or %NULL. Please see specific note abou
t this field. | |
| * @param_spec: (allow-none): a #GdaSqlParamSpec, or %NULL if this is not a
variable | | * @param_spec: (allow-none): a #GdaSqlParamSpec, or %NULL if this is not a
variable | |
| * @func: (allow-none): not %NULL if expression is a function or aggregate | | * @func: (allow-none): not %NULL if expression is a function or aggregate | |
| * @cond: (allow-none): not %NULL if expression is a condition or an operat
ion | | * @cond: (allow-none): not %NULL if expression is a condition or an operat
ion | |
| * @select: (allow-none): not %NULL if expression is a sub select statement
(#GdaSqlStatementSelect or #GdaSqlStatementCompound) | | * @select: (allow-none): not %NULL if expression is a sub select statement
(#GdaSqlStatementSelect or #GdaSqlStatementCompound) | |
| * @case_s: (allow-none): not %NULL if expression is a CASE WHEN ... expres
sion | | * @case_s: (allow-none): not %NULL if expression is a CASE WHEN ... expres
sion | |
| * @cast_as: (allow-none): not %NULL if expression must be cast to another
data type | | * @cast_as: (allow-none): not %NULL if expression must be cast to another
data type | |
| * @value_is_ident: Please see specific note about the @value field | | * @value_is_ident: Please see specific note about the @value field | |
| * | | * | |
| | | | |
| skipping to change at line 110 | | skipping to change at line 154 | |
| void gda_sql_expr_free (GdaSqlExpr *expr); | | void gda_sql_expr_free (GdaSqlExpr *expr); | |
| GdaSqlExpr *gda_sql_expr_copy (GdaSqlExpr *expr); | | GdaSqlExpr *gda_sql_expr_copy (GdaSqlExpr *expr); | |
| gchar *gda_sql_expr_serialize (GdaSqlExpr *expr); | | gchar *gda_sql_expr_serialize (GdaSqlExpr *expr); | |
| void _gda_sql_expr_check_clean (GdaSqlExpr *expr); | | void _gda_sql_expr_check_clean (GdaSqlExpr *expr); | |
| | | | |
| void gda_sql_expr_take_select (GdaSqlExpr *expr, GdaSqlState
ment *stmt); | | void gda_sql_expr_take_select (GdaSqlExpr *expr, GdaSqlState
ment *stmt); | |
| | | | |
| /* | | /* | |
| * Any Table's field | | * Any Table's field | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlField: (skip) | |
| | | * any: | |
| | | * @field_name: | |
| | | * @validity_meta_table_column: | |
| | | * | |
| | | * This structure represents the name of a table's field. | |
| | | **/ | |
| | | | |
| struct _GdaSqlField { | | struct _GdaSqlField { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| gchar *field_name; | | gchar *field_name; | |
| | | | |
| /* validity check with a connection */ | | /* validity check with a connection */ | |
| GdaMetaTableColumn *validity_meta_table_column; | | GdaMetaTableColumn *validity_meta_table_column; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| gpointer _gda_reserved1; | | gpointer _gda_reserved1; | |
| | | | |
| skipping to change at line 134 | | skipping to change at line 187 | |
| void gda_sql_field_free (GdaSqlField *field); | | void gda_sql_field_free (GdaSqlField *field); | |
| GdaSqlField *gda_sql_field_copy (GdaSqlField *field); | | GdaSqlField *gda_sql_field_copy (GdaSqlField *field); | |
| gchar *gda_sql_field_serialize (GdaSqlField *field); | | gchar *gda_sql_field_serialize (GdaSqlField *field); | |
| void _gda_sql_field_check_clean (GdaSqlField *field); | | void _gda_sql_field_check_clean (GdaSqlField *field); | |
| | | | |
| void gda_sql_field_take_name (GdaSqlField *field, GValue *
value); | | void gda_sql_field_take_name (GdaSqlField *field, GValue *
value); | |
| | | | |
| /* | | /* | |
| * Any table | | * Any table | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlTable: (skip) | |
| | | * @any: | |
| | | * @table_name: | |
| | | * @validity_meta_object: | |
| | | * | |
| | | * This structure represents the name of a table. | |
| | | */ | |
| struct _GdaSqlTable | | struct _GdaSqlTable | |
| { | | { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| gchar *table_name; | | gchar *table_name; | |
| | | | |
| /* validity check with a connection */ | | /* validity check with a connection */ | |
| GdaMetaDbObject *validity_meta_object; | | GdaMetaDbObject *validity_meta_object; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| | | | |
| skipping to change at line 159 | | skipping to change at line 220 | |
| void gda_sql_table_free (GdaSqlTable *table); | | void gda_sql_table_free (GdaSqlTable *table); | |
| GdaSqlTable *gda_sql_table_copy (GdaSqlTable *table); | | GdaSqlTable *gda_sql_table_copy (GdaSqlTable *table); | |
| gchar *gda_sql_table_serialize (GdaSqlTable *table); | | gchar *gda_sql_table_serialize (GdaSqlTable *table); | |
| void _gda_sql_table_check_clean (GdaSqlTable *table); | | void _gda_sql_table_check_clean (GdaSqlTable *table); | |
| | | | |
| void gda_sql_table_take_name (GdaSqlTable *table, GValue *
value); | | void gda_sql_table_take_name (GdaSqlTable *table, GValue *
value); | |
| | | | |
| /* | | /* | |
| * A function with any number of arguments | | * A function with any number of arguments | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlFunction: (skip) | |
| | | * @any: inheritance structure | |
| | | * @function_name: name of the function , in the form [[catalog.]schema.]fu | |
| | | ncti | |
| | | * @args_list: list of #GdaSqlExpr expressions, one for each argument | |
| | | * | |
| | | * This structure represents a function or an aggregate with zero or more a | |
| | | rgum | |
| | | **/ | |
| struct _GdaSqlFunction { | | struct _GdaSqlFunction { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| gchar *function_name; | | gchar *function_name; | |
| GSList *args_list; | | GSList *args_list; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| gpointer _gda_reserved1; | | gpointer _gda_reserved1; | |
| gpointer _gda_reserved2; | | gpointer _gda_reserved2; | |
| }; | | }; | |
| | | | |
| skipping to change at line 252 | | skipping to change at line 321 | |
| GDA_SQL_OPERATOR_TYPE_MINUS, | | GDA_SQL_OPERATOR_TYPE_MINUS, | |
| GDA_SQL_OPERATOR_TYPE_STAR, | | GDA_SQL_OPERATOR_TYPE_STAR, | |
| GDA_SQL_OPERATOR_TYPE_DIV, | | GDA_SQL_OPERATOR_TYPE_DIV, | |
| GDA_SQL_OPERATOR_TYPE_REM, | | GDA_SQL_OPERATOR_TYPE_REM, | |
| GDA_SQL_OPERATOR_TYPE_BITAND, | | GDA_SQL_OPERATOR_TYPE_BITAND, | |
| GDA_SQL_OPERATOR_TYPE_BITOR, | | GDA_SQL_OPERATOR_TYPE_BITOR, | |
| GDA_SQL_OPERATOR_TYPE_BITNOT, | | GDA_SQL_OPERATOR_TYPE_BITNOT, | |
| GDA_SQL_OPERATOR_TYPE_ILIKE | | GDA_SQL_OPERATOR_TYPE_ILIKE | |
| } GdaSqlOperatorType; | | } GdaSqlOperatorType; | |
| | | | |
|
| | | /** | |
| | | * GdaSqlOperation: (skip) | |
| | | * @any: inheritance structure | |
| | | * @operator_type: | |
| | | * @operands: (element-type Gda.SqlExpr): list of #GdaSqlExpr operands | |
| | | * | |
| | | * This structure represents an operation between one or more operands. | |
| | | */ | |
| struct _GdaSqlOperation { | | struct _GdaSqlOperation { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| GdaSqlOperatorType operator_type; | | GdaSqlOperatorType operator_type; | |
| GSList *operands; | | GSList *operands; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| gpointer _gda_reserved1; | | gpointer _gda_reserved1; | |
| gpointer _gda_reserved2; | | gpointer _gda_reserved2; | |
| }; | | }; | |
| | | | |
| skipping to change at line 273 | | skipping to change at line 350 | |
| GdaSqlOperation *gda_sql_operation_new (GdaSqlAnyPart *parent); | | GdaSqlOperation *gda_sql_operation_new (GdaSqlAnyPart *parent); | |
| void gda_sql_operation_free (GdaSqlOperation *operat
ion); | | void gda_sql_operation_free (GdaSqlOperation *operat
ion); | |
| GdaSqlOperation *gda_sql_operation_copy (GdaSqlOperation *operat
ion); | | GdaSqlOperation *gda_sql_operation_copy (GdaSqlOperation *operat
ion); | |
| gchar *gda_sql_operation_serialize (GdaSqlOperation *operat
ion); | | gchar *gda_sql_operation_serialize (GdaSqlOperation *operat
ion); | |
| const gchar *gda_sql_operation_operator_to_string (GdaSqlOperatorType
op); | | const gchar *gda_sql_operation_operator_to_string (GdaSqlOperatorType
op); | |
| GdaSqlOperatorType gda_sql_operation_operator_from_string (const gchar *
op); | | GdaSqlOperatorType gda_sql_operation_operator_from_string (const gchar *
op); | |
| | | | |
| /* | | /* | |
| * A CASE expression | | * A CASE expression | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlCase: (skip) | |
| | | * @any: inheritance structure | |
| | | * @base_expr: expression to test | |
| | | * @when_expr_list: list of #GdaSqlExpr, one for each WHEN clause | |
| | | * @then_expr_list: list of #GdaSqlExpr, one for each THEN clause | |
| | | * @else_expr: default expression for the CASE | |
| | | * | |
| | | * This structure represents a CASE WHEN... construct | |
| | | **/ | |
| struct _GdaSqlCase | | struct _GdaSqlCase | |
| { | | { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| GdaSqlExpr *base_expr; | | GdaSqlExpr *base_expr; | |
| GSList *when_expr_list; | | GSList *when_expr_list; | |
| GSList *then_expr_list; | | GSList *then_expr_list; | |
| GdaSqlExpr *else_expr; | | GdaSqlExpr *else_expr; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| | | | |
| skipping to change at line 295 | | skipping to change at line 382 | |
| }; | | }; | |
| | | | |
| GdaSqlCase *gda_sql_case_new (GdaSqlAnyPart *parent); | | GdaSqlCase *gda_sql_case_new (GdaSqlAnyPart *parent); | |
| void gda_sql_case_free (GdaSqlCase *sc); | | void gda_sql_case_free (GdaSqlCase *sc); | |
| GdaSqlCase *gda_sql_case_copy (GdaSqlCase *sc); | | GdaSqlCase *gda_sql_case_copy (GdaSqlCase *sc); | |
| gchar *gda_sql_case_serialize (GdaSqlCase *sc); | | gchar *gda_sql_case_serialize (GdaSqlCase *sc); | |
| | | | |
| /* | | /* | |
| * Any expression in a SELECT ... before the FROM clause | | * Any expression in a SELECT ... before the FROM clause | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlSelectField: (skip) | |
| | | * @any: inheritance structure | |
| | | * @expr: expression | |
| | | * @field_name: field name part of @expr if @expr represents a field | |
| | | * @table_name: table name part of @expr if @expr represents a field | |
| | | * @as: alias | |
| | | * @validity_meta_object: | |
| | | * @validity_meta_table_column: | |
| | | * | |
| | | * This structure represents a selected item in a SELECT statement (when ex | |
| | | ecut | |
| | | * will have one column per selected item). Note that the @table_name and | |
| | | * @field_name field parts <emphasis>will be</emphasis> overwritten by &LIB | |
| | | GDA; | |
| | | * set the value of @expr->value instead. | |
| | | **/ | |
| struct _GdaSqlSelectField | | struct _GdaSqlSelectField | |
| { | | { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| GdaSqlExpr *expr; | | GdaSqlExpr *expr; | |
| gchar *field_name; /* may be NULL if expr does not refe
r to a table.field, can also be "*" */ | | gchar *field_name; /* may be NULL if expr does not refe
r to a table.field, can also be "*" */ | |
| gchar *table_name; /* may be NULL if expr does not refe
r to a table.field */ | | gchar *table_name; /* may be NULL if expr does not refe
r to a table.field */ | |
| gchar *as; | | gchar *as; | |
| | | | |
| /* validity check with a connection */ | | /* validity check with a connection */ | |
| GdaMetaDbObject *validity_meta_object; | | GdaMetaDbObject *validity_meta_object; | |
| | | | |
| skipping to change at line 326 | | skipping to change at line 428 | |
| gchar *gda_sql_select_field_serialize (GdaSqlSelectField *
field); | | gchar *gda_sql_select_field_serialize (GdaSqlSelectField *
field); | |
| void _gda_sql_select_field_check_clean (GdaSqlSelectField *
field); | | void _gda_sql_select_field_check_clean (GdaSqlSelectField *
field); | |
| | | | |
| void gda_sql_select_field_take_star_value(GdaSqlSelectField *
field, GValue *value); | | void gda_sql_select_field_take_star_value(GdaSqlSelectField *
field, GValue *value); | |
| void gda_sql_select_field_take_expr (GdaSqlSelectField *
field, GdaSqlExpr *expr); | | void gda_sql_select_field_take_expr (GdaSqlSelectField *
field, GdaSqlExpr *expr); | |
| void gda_sql_select_field_take_alias (GdaSqlSelectField *
field, GValue *alias); | | void gda_sql_select_field_take_alias (GdaSqlSelectField *
field, GValue *alias); | |
| | | | |
| /* | | /* | |
| * Any TARGET ... in a SELECT statement | | * Any TARGET ... in a SELECT statement | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlSelectTarget: (skip) | |
| | | * @any: inheritance structure | |
| | | * @expr: expression | |
| | | * @table_name: table name part of @expr if @expr represents a table | |
| | | * @as: alias | |
| | | * @validity_meta_object: | |
| | | * | |
| | | * This structure represents a target used to fetch data from in a SELECT s | |
| | | tate | |
| | | * a sub select. Note that the @table_name | |
| | | * part <emphasis>will be</emphasis> overwritten by &LIBGDA;, | |
| | | * set the value of @expr->value instead. | |
| | | */ | |
| struct _GdaSqlSelectTarget | | struct _GdaSqlSelectTarget | |
| { | | { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| GdaSqlExpr *expr; | | GdaSqlExpr *expr; | |
| gchar *table_name; /* may be NULL if expr does not refe
r to a table */ | | gchar *table_name; /* may be NULL if expr does not refe
r to a table */ | |
| gchar *as; | | gchar *as; | |
| | | | |
| /* validity check with a connection */ | | /* validity check with a connection */ | |
| GdaMetaDbObject *validity_meta_object; | | GdaMetaDbObject *validity_meta_object; | |
| | | | |
| | | | |
| skipping to change at line 355 | | skipping to change at line 470 | |
| gchar *gda_sql_select_target_serialize (GdaSqlSelectTarge
t *target); | | gchar *gda_sql_select_target_serialize (GdaSqlSelectTarge
t *target); | |
| void _gda_sql_select_target_check_clean (GdaSqlSelectTarge
t *target); | | void _gda_sql_select_target_check_clean (GdaSqlSelectTarge
t *target); | |
| | | | |
| void gda_sql_select_target_take_table_name (GdaSqlSelectTarg
et *target, GValue *value); | | void gda_sql_select_target_take_table_name (GdaSqlSelectTarg
et *target, GValue *value); | |
| void gda_sql_select_target_take_select (GdaSqlSelectTarget *
target, GdaSqlStatement *stmt); | | void gda_sql_select_target_take_select (GdaSqlSelectTarget *
target, GdaSqlStatement *stmt); | |
| void gda_sql_select_target_take_alias (GdaSqlSelectTarget *t
arget, GValue *alias); | | void gda_sql_select_target_take_alias (GdaSqlSelectTarget *t
arget, GValue *alias); | |
| | | | |
| /* | | /* | |
| * Any JOIN ... in a SELECT statement | | * Any JOIN ... in a SELECT statement | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlSelectJoinType: | |
| | | * @GDA_SQL_SELECT_JOIN_CROSS: | |
| | | * @GDA_SQL_SELECT_JOIN_NATURAL: | |
| | | * @GDA_SQL_SELECT_JOIN_INNER: | |
| | | * @GDA_SQL_SELECT_JOIN_LEFT: | |
| | | * @GDA_SQL_SELECT_JOIN_RIGHT: | |
| | | * @GDA_SQL_SELECT_JOIN_FULL: | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| GDA_SQL_SELECT_JOIN_CROSS, | | GDA_SQL_SELECT_JOIN_CROSS, | |
| GDA_SQL_SELECT_JOIN_NATURAL, | | GDA_SQL_SELECT_JOIN_NATURAL, | |
| GDA_SQL_SELECT_JOIN_INNER, | | GDA_SQL_SELECT_JOIN_INNER, | |
| GDA_SQL_SELECT_JOIN_LEFT, | | GDA_SQL_SELECT_JOIN_LEFT, | |
| GDA_SQL_SELECT_JOIN_RIGHT, | | GDA_SQL_SELECT_JOIN_RIGHT, | |
| GDA_SQL_SELECT_JOIN_FULL | | GDA_SQL_SELECT_JOIN_FULL | |
| } GdaSqlSelectJoinType; | | } GdaSqlSelectJoinType; | |
| | | | |
| /** | | /** | |
|
| * GdaSqlSelectJoin: | | * GdaSqlSelectJoin: (skip) | |
| * @any: inheritance structure | | * @any: inheritance structure | |
| * @type: type of join | | * @type: type of join | |
| * @position: represents a join between a target at (pos < @position) an
d the one at @position | | * @position: represents a join between a target at (pos < @position) an
d the one at @position | |
| * @expr: (allow-none): joining expression, or %NULL | | * @expr: (allow-none): joining expression, or %NULL | |
| * @use: (allow-none): list of #GdaSqlField pointers to use when joining, o
r %NULL | | * @use: (allow-none): list of #GdaSqlField pointers to use when joining, o
r %NULL | |
| * | | * | |
| * This structure represents a join between two targets in a SELECT stateme
nt. | | * This structure represents a join between two targets in a SELECT stateme
nt. | |
| */ | | */ | |
| struct _GdaSqlSelectJoin | | struct _GdaSqlSelectJoin | |
| { | | { | |
| | | | |
| skipping to change at line 399 | | skipping to change at line 523 | |
| void gda_sql_select_join_free (GdaSqlSelectJoin *jo
in); | | void gda_sql_select_join_free (GdaSqlSelectJoin *jo
in); | |
| GdaSqlSelectJoin *gda_sql_select_join_copy (GdaSqlSelectJoin *jo
in); | | GdaSqlSelectJoin *gda_sql_select_join_copy (GdaSqlSelectJoin *jo
in); | |
| gchar *gda_sql_select_join_serialize (GdaSqlSelectJoin *jo
in); | | gchar *gda_sql_select_join_serialize (GdaSqlSelectJoin *jo
in); | |
| | | | |
| const gchar *gda_sql_select_join_type_to_string (GdaSqlSelectJoinType
type); | | const gchar *gda_sql_select_join_type_to_string (GdaSqlSelectJoinType
type); | |
| | | | |
| /* | | /* | |
| * Any FROM ... in a SELECT statement | | * Any FROM ... in a SELECT statement | |
| */ | | */ | |
| /** | | /** | |
|
| * GdaSqlSelectFrom: | | * GdaSqlSelectFrom: (skip) | |
| * @any: inheritance structure | | * @any: inheritance structure | |
| * @targets: (element-type Gda.SqlSelectTarget): list of #GdaSqlSelectTarge
t | | * @targets: (element-type Gda.SqlSelectTarget): list of #GdaSqlSelectTarge
t | |
| * @joins: (element-type Gda.SqlSelectJoin): list of #GdaSqlSelectJoin | | * @joins: (element-type Gda.SqlSelectJoin): list of #GdaSqlSelectJoin | |
| * | | * | |
| * This structure represents the FROM clause of a SELECT statement, it list
s targets and joins | | * This structure represents the FROM clause of a SELECT statement, it list
s targets and joins | |
| */ | | */ | |
| struct _GdaSqlSelectFrom | | struct _GdaSqlSelectFrom | |
| { | | { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| GSList *targets; | | GSList *targets; | |
| | | | |
| skipping to change at line 429 | | skipping to change at line 553 | |
| void gda_sql_select_from_free (GdaSqlSelectFrom *fr
om); | | void gda_sql_select_from_free (GdaSqlSelectFrom *fr
om); | |
| GdaSqlSelectFrom *gda_sql_select_from_copy (GdaSqlSelectFrom *fr
om); | | GdaSqlSelectFrom *gda_sql_select_from_copy (GdaSqlSelectFrom *fr
om); | |
| gchar *gda_sql_select_from_serialize (GdaSqlSelectFrom *fr
om); | | gchar *gda_sql_select_from_serialize (GdaSqlSelectFrom *fr
om); | |
| | | | |
| void gda_sql_select_from_take_new_target(GdaSqlSelectFrom *fr
om, GdaSqlSelectTarget *target); | | void gda_sql_select_from_take_new_target(GdaSqlSelectFrom *fr
om, GdaSqlSelectTarget *target); | |
| void gda_sql_select_from_take_new_join (GdaSqlSelectFrom *fr
om, GdaSqlSelectJoin *join); | | void gda_sql_select_from_take_new_join (GdaSqlSelectFrom *fr
om, GdaSqlSelectJoin *join); | |
| | | | |
| /* | | /* | |
| * Any expression in a SELECT ... after the ORDER BY | | * Any expression in a SELECT ... after the ORDER BY | |
| */ | | */ | |
|
| | | /** | |
| | | * GdaSqlSelectOrder: (skip) | |
| | | * @any: inheritance structure | |
| | | * @expr: expression to order on | |
| | | * @asc: TRUE is ordering is ascending | |
| | | * @collation_name: name of the collation to use for ordering | |
| | | * | |
| | | * This structure represents the ordering of a SELECT statement. | |
| | | */ | |
| struct _GdaSqlSelectOrder | | struct _GdaSqlSelectOrder | |
| { | | { | |
| GdaSqlAnyPart any; | | GdaSqlAnyPart any; | |
| GdaSqlExpr *expr; | | GdaSqlExpr *expr; | |
| gboolean asc; | | gboolean asc; | |
| gchar *collation_name; | | gchar *collation_name; | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* Padding for future expansion */ | | /* Padding for future expansion */ | |
| gpointer _gda_reserved1; | | gpointer _gda_reserved1; | |
| | | | |
End of changes. 23 change blocks. |
| 3 lines changed or deleted | | 141 lines changed or added | |
|