| gda-data-model.h | | gda-data-model.h | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 78 | |
| | | | |
| typedef enum { | | typedef enum { | |
| GDA_DATA_MODEL_ROW_OUT_OF_RANGE_ERROR, | | GDA_DATA_MODEL_ROW_OUT_OF_RANGE_ERROR, | |
| GDA_DATA_MODEL_COLUMN_OUT_OF_RANGE_ERROR, | | GDA_DATA_MODEL_COLUMN_OUT_OF_RANGE_ERROR, | |
| GDA_DATA_MODEL_VALUES_LIST_ERROR, | | GDA_DATA_MODEL_VALUES_LIST_ERROR, | |
| GDA_DATA_MODEL_VALUE_TYPE_ERROR, | | GDA_DATA_MODEL_VALUE_TYPE_ERROR, | |
| GDA_DATA_MODEL_ROW_NOT_FOUND_ERROR, | | GDA_DATA_MODEL_ROW_NOT_FOUND_ERROR, | |
| GDA_DATA_MODEL_ACCESS_ERROR, | | GDA_DATA_MODEL_ACCESS_ERROR, | |
| GDA_DATA_MODEL_FEATURE_NON_SUPPORTED_ERROR, | | GDA_DATA_MODEL_FEATURE_NON_SUPPORTED_ERROR, | |
| GDA_DATA_MODEL_FILE_EXIST_ERROR, | | GDA_DATA_MODEL_FILE_EXIST_ERROR, | |
|
| GDA_DATA_MODEL_XML_FORMAT_ERROR | | GDA_DATA_MODEL_XML_FORMAT_ERROR, | |
| | | | |
| | | GDA_DATA_MODEL_TRUNCATED_ERROR | |
| } GdaDataModelError; | | } GdaDataModelError; | |
| | | | |
| /* struct for the interface */ | | /* struct for the interface */ | |
| struct _GdaDataModelIface { | | struct _GdaDataModelIface { | |
| GTypeInterface g_iface; | | GTypeInterface g_iface; | |
| | | | |
| /* virtual table */ | | /* virtual table */ | |
| gint (* i_get_n_rows) (GdaDataModel *model); | | gint (* i_get_n_rows) (GdaDataModel *model); | |
| gint (* i_get_n_columns) (GdaDataModel *model); | | gint (* i_get_n_columns) (GdaDataModel *model); | |
| | | | |
| | | | |
| skipping to change at line 120 | | skipping to change at line 122 | |
| void (* i_set_notify) (GdaDataModel *model, gb
oolean do_notify_changes); | | void (* i_set_notify) (GdaDataModel *model, gb
oolean do_notify_changes); | |
| gboolean (* i_get_notify) (GdaDataModel *model); | | gboolean (* i_get_notify) (GdaDataModel *model); | |
| void (* i_send_hint) (GdaDataModel *model, Gd
aDataModelHint hint, const GValue *hint_value); | | void (* i_send_hint) (GdaDataModel *model, Gd
aDataModelHint hint, const GValue *hint_value); | |
| | | | |
| /* signals */ | | /* signals */ | |
| void (* row_inserted) (GdaDataModel *model, gi
nt row); | | void (* row_inserted) (GdaDataModel *model, gi
nt row); | |
| void (* row_updated) (GdaDataModel *model, gi
nt row); | | void (* row_updated) (GdaDataModel *model, gi
nt row); | |
| void (* row_removed) (GdaDataModel *model, gi
nt row); | | void (* row_removed) (GdaDataModel *model, gi
nt row); | |
| void (* changed) (GdaDataModel *model); | | void (* changed) (GdaDataModel *model); | |
| void (* reset) (GdaDataModel *model); | | void (* reset) (GdaDataModel *model); | |
|
| | | | |
| | | /* getting more information about a data model */ | |
| | | GError **(* i_get_exceptions) (GdaDataModel *model); | |
| }; | | }; | |
| | | | |
| GType gda_data_model_get_type (void) G_GNUC_CON
ST; | | GType gda_data_model_get_type (void) G_GNUC_CON
ST; | |
| | | | |
| GdaDataModelAccessFlags gda_data_model_get_access_flags (GdaDataModel *mo
del); | | GdaDataModelAccessFlags gda_data_model_get_access_flags (GdaDataModel *mo
del); | |
| | | | |
| gint gda_data_model_get_n_rows (GdaDataModel *mo
del); | | gint gda_data_model_get_n_rows (GdaDataModel *mo
del); | |
| gint gda_data_model_get_n_columns (GdaDataModel *mo
del); | | gint gda_data_model_get_n_columns (GdaDataModel *mo
del); | |
| | | | |
| GdaColumn *gda_data_model_describe_column (GdaDataModel *mo
del, gint col); | | GdaColumn *gda_data_model_describe_column (GdaDataModel *mo
del, gint col); | |
| | | | |
| skipping to change at line 154 | | skipping to change at line 159 | |
| const GValue *val
ue, GError **error); | | const GValue *val
ue, GError **error); | |
| gboolean gda_data_model_set_values (GdaDataModel *mo
del, gint row, | | gboolean gda_data_model_set_values (GdaDataModel *mo
del, gint row, | |
| GList *values, GE
rror **error); | | GList *values, GE
rror **error); | |
| gint gda_data_model_append_row (GdaDataModel *mo
del, GError **error); | | gint gda_data_model_append_row (GdaDataModel *mo
del, GError **error); | |
| gint gda_data_model_append_values (GdaDataModel *mo
del, const GList *values, GError **error); | | gint gda_data_model_append_values (GdaDataModel *mo
del, const GList *values, GError **error); | |
| gboolean gda_data_model_remove_row (GdaDataModel *mo
del, gint row, GError **error); | | gboolean gda_data_model_remove_row (GdaDataModel *mo
del, gint row, GError **error); | |
| gint gda_data_model_get_row_from_values (GdaDataModel *mo
del, GSList *values, gint *cols_index); | | gint gda_data_model_get_row_from_values (GdaDataModel *mo
del, GSList *values, gint *cols_index); | |
| | | | |
| void gda_data_model_send_hint (GdaDataModel *mo
del, GdaDataModelHint hint, const GValue *hint_value); | | void gda_data_model_send_hint (GdaDataModel *mo
del, GdaDataModelHint hint, const GValue *hint_value); | |
| | | | |
|
| | | GError **gda_data_model_get_exceptions (GdaDataModel *mo | |
| | | del); | |
| | | | |
| /* contents saving and loading */ | | /* contents saving and loading */ | |
| gchar *gda_data_model_export_to_string (GdaDataModel *mo
del, GdaDataModelIOFormat format, | | gchar *gda_data_model_export_to_string (GdaDataModel *mo
del, GdaDataModelIOFormat format, | |
| const gint *cols,
gint nb_cols, | | const gint *cols,
gint nb_cols, | |
| const gint *rows,
gint nb_rows, GdaSet *options); | | const gint *rows,
gint nb_rows, GdaSet *options); | |
| gboolean gda_data_model_export_to_file (GdaDataModel *mo
del, GdaDataModelIOFormat format, | | gboolean gda_data_model_export_to_file (GdaDataModel *mo
del, GdaDataModelIOFormat format, | |
| const gchar *file
, | | const gchar *file
, | |
| const gint *cols,
gint nb_cols, | | const gint *cols,
gint nb_cols, | |
| const gint *rows,
gint nb_rows, | | const gint *rows,
gint nb_rows, | |
| GdaSet *options,
GError **error); | | GdaSet *options,
GError **error); | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 9 lines changed or added | |
|
| gda-meta-store.h | | gda-meta-store.h | |
|
| /* gda-meta-store.h | | /* | |
| | | * Copyright (C) 2008 - 2011 The GNOME Foundation. | |
| * | | * | |
|
| * Copyright (C) 2008 - 2011 Vivien Malerba | | * AUTHORS: | |
| | | * Vivien Malerba <malerba@gnome-db.org> | |
| | | * 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. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Library General Public License for more details. | | * Library General Public License for more details. | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 117 | |
| }; | | }; | |
| | | | |
| GType gda_meta_store_get_type (void) G_GNUC_CON
ST; | | GType gda_meta_store_get_type (void) G_GNUC_CON
ST; | |
| GdaMetaStore *gda_meta_store_new_with_file (const gchar *fil
e_name); | | GdaMetaStore *gda_meta_store_new_with_file (const gchar *fil
e_name); | |
| GdaMetaStore *gda_meta_store_new (const gchar *cnc
_string); | | GdaMetaStore *gda_meta_store_new (const gchar *cnc
_string); | |
| gint gda_meta_store_get_version (GdaMetaStore *st
ore); | | gint gda_meta_store_get_version (GdaMetaStore *st
ore); | |
| | | | |
| GdaConnection *gda_meta_store_get_internal_connection (GdaMetaStore *st
ore); | | GdaConnection *gda_meta_store_get_internal_connection (GdaMetaStore *st
ore); | |
| gchar *gda_meta_store_sql_identifier_quote (const gchar *id,
GdaConnection *cnc); | | gchar *gda_meta_store_sql_identifier_quote (const gchar *id,
GdaConnection *cnc); | |
| GdaDataModel *gda_meta_store_extract (GdaMetaStore *st
ore, const gchar *select_sql, GError **error, ...); | | GdaDataModel *gda_meta_store_extract (GdaMetaStore *st
ore, const gchar *select_sql, GError **error, ...); | |
|
| | | GdaDataModel *gda_meta_store_extract_v (GdaMetaStore *st | |
| | | ore, const gchar *select_sql, GHashTable *vars, | |
| | | GError **error); | |
| gboolean gda_meta_store_modify (GdaMetaStore *st
ore, const gchar *table_name, | | gboolean gda_meta_store_modify (GdaMetaStore *st
ore, const gchar *table_name, | |
| GdaDataModel *new
_data, const gchar *condition, GError **error, ...); | | GdaDataModel *new
_data, const gchar *condition, GError **error, ...); | |
|
| | | gboolean gda_meta_store_modify_v (GdaMetaStore *st | |
| | | ore, const gchar *table_name, | |
| | | GdaDataModel *new | |
| | | _data, const gchar *condition, | |
| | | gint nvalues, con | |
| | | st gchar **value_names, | |
| | | const GValue **va | |
| | | lues, GError **error); | |
| gboolean gda_meta_store_modify_with_context (GdaMetaStore *st
ore, GdaMetaContext *context, | | gboolean gda_meta_store_modify_with_context (GdaMetaStore *st
ore, GdaMetaContext *context, | |
| GdaDataModel *new
_data, GError **error); | | GdaDataModel *new
_data, GError **error); | |
| GdaDataModel *gda_meta_store_create_modify_data_model (GdaMetaStore *st
ore, const gchar *table_name); | | GdaDataModel *gda_meta_store_create_modify_data_model (GdaMetaStore *st
ore, const gchar *table_name); | |
| | | | |
| void gda_meta_store_set_identifiers_style (GdaMetaStore *st
ore, GdaSqlIdentifierStyle style); | | void gda_meta_store_set_identifiers_style (GdaMetaStore *st
ore, GdaSqlIdentifierStyle style); | |
| void gda_meta_store_set_reserved_keywords_func(GdaMetaStore *s
tore, GdaSqlReservedKeywordsFunc func); | | void gda_meta_store_set_reserved_keywords_func(GdaMetaStore *s
tore, GdaSqlReservedKeywordsFunc func); | |
| | | | |
| gboolean gda_meta_store_get_attribute_value (GdaMetaStore *st
ore, const gchar *att_name, | | gboolean gda_meta_store_get_attribute_value (GdaMetaStore *st
ore, const gchar *att_name, | |
| gchar **att_value
, GError **error); | | gchar **att_value
, GError **error); | |
| gboolean gda_meta_store_set_attribute_value (GdaMetaStore *st
ore, const gchar *att_name, | | gboolean gda_meta_store_set_attribute_value (GdaMetaStore *st
ore, const gchar *att_name, | |
| | | | |
End of changes. 4 change blocks. |
| 2 lines changed or deleted | | 16 lines changed or added | |
|
| gda-server-operation.h | | gda-server-operation.h | |
| /* GDA library | | /* GDA library | |
| * Copyright (C) 2006 - 2009 The GNOME Foundation. | | * Copyright (C) 2006 - 2009 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Vivien Malerba <malerba@gnome-db.org> | | * Vivien Malerba <malerba@gnome-db.org> | |
|
| | | * 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. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Library General Public License for more details. | | * Library General Public License for more details. | |
| | | | |
| skipping to change at line 145 | | skipping to change at line 146 | |
| }; | | }; | |
| | | | |
| GType gda_server_operation_get_type (vo
id) G_GNUC_CONST; | | GType gda_server_operation_get_type (vo
id) G_GNUC_CONST; | |
| GdaServerOperation *gda_server_operation_new (Gd
aServerOperationType op_type, const gchar *xml_file); | | GdaServerOperation *gda_server_operation_new (Gd
aServerOperationType op_type, const gchar *xml_file); | |
| GdaServerOperationType gda_server_operation_get_op_type (Gd
aServerOperation *op); | | GdaServerOperationType gda_server_operation_get_op_type (Gd
aServerOperation *op); | |
| const gchar *gda_server_operation_op_type_to_string (Gd
aServerOperationType type); | | const gchar *gda_server_operation_op_type_to_string (Gd
aServerOperationType type); | |
| GdaServerOperationType gda_server_operation_string_to_op_type (co
nst gchar *str); | | GdaServerOperationType gda_server_operation_string_to_op_type (co
nst gchar *str); | |
| GdaServerOperationNode *gda_server_operation_get_node_info (Gd
aServerOperation *op, const gchar *path_format, ...); | | GdaServerOperationNode *gda_server_operation_get_node_info (Gd
aServerOperation *op, const gchar *path_format, ...); | |
| | | | |
| const GValue *gda_server_operation_get_value_at (Gd
aServerOperation *op, const gchar *path_format, ...); | | const GValue *gda_server_operation_get_value_at (Gd
aServerOperation *op, const gchar *path_format, ...); | |
|
| | | const GValue *gda_server_operation_get_value_at_path (Gd
aServerOperation *op, const gchar *path); | |
| gchar *gda_server_operation_get_sql_identifier_at (Gd
aServerOperation *op, | | gchar *gda_server_operation_get_sql_identifier_at (Gd
aServerOperation *op, | |
| Gda
Connection *cnc, GdaServerProvider *prov, | | Gda
Connection *cnc, GdaServerProvider *prov, | |
| con
st gchar *path_format, ...); | | con
st gchar *path_format, ...); | |
|
| | | gchar *gda_server_operation_get_sql_identifier_at_path | |
| | | (GdaServerOperation *op, | |
| | | | |
| | | GdaConnection *cnc, GdaServerProvider *prov, | |
| | | | |
| | | const gchar *path); | |
| gboolean gda_server_operation_set_value_at (Gd
aServerOperation *op, const gchar *value, | | gboolean gda_server_operation_set_value_at (Gd
aServerOperation *op, const gchar *value, | |
| GEr
ror **error, const gchar *path_format, ...); | | GEr
ror **error, const gchar *path_format, ...); | |
|
| | | gboolean gda_server_operation_set_value_at_path (Gd | |
| | | aServerOperation *op, const gchar *value, | |
| | | con | |
| | | st gchar *path, GError **error); | |
| | | | |
| xmlNodePtr gda_server_operation_save_data_to_xml (Gd
aServerOperation *op, GError **error); | | xmlNodePtr gda_server_operation_save_data_to_xml (Gd
aServerOperation *op, GError **error); | |
| gboolean gda_server_operation_load_data_from_xml (Gd
aServerOperation *op, | | gboolean gda_server_operation_load_data_from_xml (Gd
aServerOperation *op, | |
| xml
NodePtr node, GError **error); | | xml
NodePtr node, GError **error); | |
| | | | |
| gchar** gda_server_operation_get_root_nodes (Gd
aServerOperation *op); | | gchar** gda_server_operation_get_root_nodes (Gd
aServerOperation *op); | |
| GdaServerOperationNodeType gda_server_operation_get_node_type (Gd
aServerOperation *op, const gchar *path, | | GdaServerOperationNodeType gda_server_operation_get_node_type (Gd
aServerOperation *op, const gchar *path, | |
| Gda
ServerOperationNodeStatus *status); | | Gda
ServerOperationNodeStatus *status); | |
| gchar *gda_server_operation_get_node_parent (Gd
aServerOperation *op, const gchar *path); | | gchar *gda_server_operation_get_node_parent (Gd
aServerOperation *op, const gchar *path); | |
| gchar *gda_server_operation_get_node_path_portion (Gd
aServerOperation *op, const gchar *path); | | gchar *gda_server_operation_get_node_path_portion (Gd
aServerOperation *op, const gchar *path); | |
| | | | |
End of changes. 4 change blocks. |
| 0 lines changed or deleted | | 12 lines changed or added | |
|
| gda-util.h | | gda-util.h | |
| /* GDA common library | | /* GDA common library | |
| * Copyright (C) 1998 - 2010 The GNOME Foundation. | | * Copyright (C) 1998 - 2010 The GNOME Foundation. | |
| * | | * | |
| * AUTHORS: | | * AUTHORS: | |
| * Rodrigo Moya <rodrigo@gnome-db.org> | | * Rodrigo Moya <rodrigo@gnome-db.org> | |
| * Vivien Malerba <malerba@gnome-db.org> | | * Vivien Malerba <malerba@gnome-db.org> | |
|
| | | * 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. | |
| * | | * | |
| * This Library is distributed in the hope that it will be useful, | | * This Library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Library General Public License for more details. | | * Library General Public License for more details. | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 59 | |
| gboolean gda_identifier_equal (const gchar *id1, const gchar *id2); | | gboolean gda_identifier_equal (const gchar *id1, const gchar *id2); | |
| gchar **gda_completion_list_get (GdaConnection *cnc, const gchar *sql,
gint start, gint end); | | gchar **gda_completion_list_get (GdaConnection *cnc, const gchar *sql,
gint start, gint end); | |
| gchar **gda_sql_identifier_split (const gchar *id); | | gchar **gda_sql_identifier_split (const gchar *id); | |
| gchar *gda_sql_identifier_quote (const gchar *id, GdaConnection *cnc,
GdaServerProvider *prov, | | gchar *gda_sql_identifier_quote (const gchar *id, GdaConnection *cnc,
GdaServerProvider *prov, | |
| gboolean meta_store_convention, gbool
ean force_quotes); | | gboolean meta_store_convention, gbool
ean force_quotes); | |
| | | | |
| /* | | /* | |
| * Param & model utilities | | * Param & model utilities | |
| */ | | */ | |
| gboolean gda_utility_check_data_model (GdaDataModel *model, gint nbcols
, ...); | | gboolean gda_utility_check_data_model (GdaDataModel *model, gint nbcols
, ...); | |
|
| | | gboolean gda_utility_check_data_model_v (GdaDataModel *model, gint nbco
ls, GType* types); | |
| gboolean gda_utility_data_model_dump_data_to_xml (GdaDataModel *model,
xmlNodePtr parent, | | gboolean gda_utility_data_model_dump_data_to_xml (GdaDataModel *model,
xmlNodePtr parent, | |
| const gint *cols, gint nb_cols
, const gint *rows, gint nb_rows, | | const gint *cols, gint nb_cols
, const gint *rows, gint nb_rows, | |
| gboolean use_col_ids); | | gboolean use_col_ids); | |
| const gchar *gda_utility_data_model_find_column_description (GdaDataSelect
*model, const gchar *field_name); | | const gchar *gda_utility_data_model_find_column_description (GdaDataSelect
*model, const gchar *field_name); | |
| gboolean gda_utility_holder_load_attributes (GdaHolder *holder, xmlNode
Ptr node, GSList *sources, GError **error); | | gboolean gda_utility_holder_load_attributes (GdaHolder *holder, xmlNode
Ptr node, GSList *sources, GError **error); | |
| | | | |
| GdaSqlStatement *gda_statement_rewrite_for_default_values (GdaStatement *st
mt, GdaSet *params, | | GdaSqlStatement *gda_statement_rewrite_for_default_values (GdaStatement *st
mt, GdaSet *params, | |
| gboolean remove,
GError **error); | | gboolean remove,
GError **error); | |
| | | | |
| /* | | /* | |
| | | | |
End of changes. 2 change blocks. |
| 0 lines changed or deleted | | 2 lines changed or added | |
|
| gda-vconnection-data-model.h | | gda-vconnection-data-model.h | |
| /* | | /* | |
|
| * Copyright (C) 2007 - 2010 The GNOME Foundation. | | * Copyright (C) 2007 - 2011 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 43 | | skipping to change at line 43 | |
| #define GDA_IS_VCONNECTION_DATA_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE
((klass), GDA_TYPE_VCONNECTION_DATA_MODEL)) | | #define GDA_IS_VCONNECTION_DATA_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE
((klass), GDA_TYPE_VCONNECTION_DATA_MODEL)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _GdaVconnectionDataModel GdaVconnectionDataModel; | | typedef struct _GdaVconnectionDataModel GdaVconnectionDataModel; | |
| typedef struct _GdaVconnectionDataModelClass GdaVconnectionDataModelClass; | | typedef struct _GdaVconnectionDataModelClass GdaVconnectionDataModelClass; | |
| typedef struct _GdaVconnectionDataModelPrivate GdaVconnectionDataModelPriva
te; | | typedef struct _GdaVconnectionDataModelPrivate GdaVconnectionDataModelPriva
te; | |
| typedef struct _GdaVconnectionDataModelSpec GdaVconnectionDataModelSpec; | | typedef struct _GdaVconnectionDataModelSpec GdaVconnectionDataModelSpec; | |
| typedef struct _GdaVconnectionDataModelFilter GdaVconnectionDataModelFilter
; | | typedef struct _GdaVconnectionDataModelFilter GdaVconnectionDataModelFilter
; | |
| | | | |
|
| typedef GList *(*GdaVconnectionDataModelCreateColumnsFunc) (GdaVconn | | /** | |
| ectionDataModelSpec *, GError **); | | * GdaVconnectionDataModelCreateColumnsFunc: | |
| typedef GdaDataModel *(*GdaVconnectionDataModelCreateModelFunc) (GdaVconn | | * @Param1: a pointer to a #GdaVconnectionDataModelSpec structure | |
| ectionDataModelSpec *); | | * @Param2: a place to store errors, or %NULL | |
| | | * @Returns: (element-type GdaColumn) (transfer full): a new list of #GdaCo | |
| | | lumn objects | |
| | | * | |
| | | * Function called to create the virtual table's columns, as #GdaColumn obj | |
| | | ects. | |
| | | */ | |
| | | typedef GList *(*GdaVconnectionDataModelCreateColumnsFunc) (GdaVconnectionD | |
| | | ataModelSpec *, GError **); | |
| | | | |
| | | /** | |
| | | * GdaVconnectionDataModelCreateModelFunc: | |
| | | * @Param1: a pointer to a #GdaVconnectionDataModelSpec structure | |
| | | * @Returns: (transfer full): a new #GdaDataModel | |
| | | * | |
| | | * Function called to create a #GdaDataModel object, called when a virtual | |
| | | table's data need to | |
| | | * be accessed, and when optimization is not handled. | |
| | | */ | |
| | | typedef GdaDataModel *(*GdaVconnectionDataModelCreateModelFunc) (GdaVconnec | |
| | | tionDataModelSpec *); | |
| | | | |
| | | /** | |
| | | * GdaVconnectionDataModelFunc: | |
| | | * @Param1: a pointer to a #GdaDataModel | |
| | | * @Param2: the name of the table represented by @Param1 | |
| | | * @Param3: a data pointer, passed as last ergument to gda_vconnection_data | |
| | | _model_foreach() | |
| | | * | |
| | | * This function is called for every #GdaDataModel representing a table in | |
| | | a #GdaVconnectionDataModel | |
| | | * connection, when using the gda_vconnection_data_model_foreach() method. | |
| | | */ | |
| typedef void (*GdaVconnectionDataModelFunc) (GdaDataModel *, const gchar *,
gpointer ); | | typedef void (*GdaVconnectionDataModelFunc) (GdaDataModel *, const gchar *,
gpointer ); | |
| | | | |
|
| /* | | /** | |
| * Enabling pre-filtering when creating a data model to be used as a table, | | * GdaVconnectionDataModelFilter: | |
| * (structure closely mapped with SQLite's sqlite3_index_info type), to ena | | | |
| ble | | | |
| * the data model to perform some filter tasks itself. | | | |
| * | | * | |
|
| * A pointer to this structure is passed to the GdaVconnectionDataModelPars | | * This structure contains data which should be analysed to produce a data | |
| eFilterFunc function | | model (used as data | |
| * and the function has to modify the variables in the *Outputs* section (a | | * for a virtual table) when a #GdaVconnectionDataModelCreateFModelFunc is | |
| nd nowhere else) | | called. The structure | |
| | | * contains an input part (which should not be modified) and and output par | |
| | | t (it is | |
| | | * closely mapped with SQLite's sqlite3_index_info type). | |
| * | | * | |
|
| * The @idxNum and @idxPointer are passed to the GdaVconnectionDataModelCre | | * A pointer to this structure is passed to the #GdaVconnectionDataModelPar | |
| ateFModelFunc function call | | seFilterFunc function | |
| | | * and the function has to modify the variables in the output part (marked | |
| | | as *Outputs*). | |
| | | * | |
| | | * The @idxNum and @idxPointer are passed to the #GdaVconnectionDataModelCr | |
| | | eateFModelFunc function call | |
| * and they represent nothing specific except that the GdaVconnectionDataMo
delParseFilterFunc and | | * and they represent nothing specific except that the GdaVconnectionDataMo
delParseFilterFunc and | |
| * GdaVconnectionDataModelCreateFModelFunc functions need to agree on their
meaning. | | * GdaVconnectionDataModelCreateFModelFunc functions need to agree on their
meaning. | |
| * | | * | |
| * See the gda-vconnection-hub.c file for an usage example. | | * See the gda-vconnection-hub.c file for an usage example. | |
| */ | | */ | |
| struct _GdaVconnectionDataModelFilter { | | struct _GdaVconnectionDataModelFilter { | |
| /* Inputs */ | | /* Inputs */ | |
| int nConstraint; /* Number of entries in aConstraint */ | | int nConstraint; /* Number of entries in aConstraint */ | |
| struct GdaVirtualConstraint { | | struct GdaVirtualConstraint { | |
| int iColumn; /* Column on left-hand side of constraint
*/ | | int iColumn; /* Column on left-hand side of constraint
*/ | |
| | | | |
| skipping to change at line 85 | | skipping to change at line 115 | |
| struct GdaVirtualConstraintUsage { | | struct GdaVirtualConstraintUsage { | |
| int argvIndex; /* if >0, constraint is part of argv to x
Filter */ | | int argvIndex; /* if >0, constraint is part of argv to x
Filter */ | |
| gboolean omit; /* Do not code a test for this constraint
if TRUE */ | | gboolean omit; /* Do not code a test for this constraint
if TRUE */ | |
| } *aConstraintUsage; | | } *aConstraintUsage; | |
| int idxNum; /* Number used to identify the index */ | | int idxNum; /* Number used to identify the index */ | |
| gpointer idxPointer; /* Pointer used to identify the index */ | | gpointer idxPointer; /* Pointer used to identify the index */ | |
| gboolean orderByConsumed; /* TRUE if output is already ordered */ | | gboolean orderByConsumed; /* TRUE if output is already ordered */ | |
| double estimatedCost; /* Estimated cost of using this index */ | | double estimatedCost; /* Estimated cost of using this index */ | |
| }; | | }; | |
| | | | |
|
| typedef void (*GdaVconnectionDataModelParseFilterFunc) (GdaVconn | | /** | |
| ectionDataModelSpec *, GdaVconnectionDataModelFilter *); | | * GdaVconnectionDataModelParseFilterFunc: | |
| typedef GdaDataModel *(*GdaVconnectionDataModelCreateFModelFunc) (GdaVconn | | * @Param1: a pointer to a #GdaVconnectionDataModelSpec structure | |
| ectionDataModelSpec *, | | * @Param2: a pointer to a #GdaVconnectionDataModelFilter structure | |
| int, cons | | * | |
| t char *, int, GValue **); | | * This function actually analyses the proposed optimization and modified @ | |
| | | Param2 to tell the database | |
| | | * engine how (if applicable) it implements the optimization. | |
| | | */ | |
| | | typedef void (*GdaVconnectionDataModelParseFilterFunc) (GdaVconnectionDataM | |
| | | odelSpec *, GdaVconnectionDataModelFilter *); | |
| | | | |
| | | /** | |
| | | * GdaVconnectionDataModelCreateFModelFunc: | |
| | | * @Param1: a pointer to a #GdaVconnectionDataModelSpec structure | |
| | | * @Param2: the index number chosen to actually execute the optimization (f | |
| | | rom #GdaVconnectionDataModelFilter's #idxNum attribute) | |
| | | * @Param3: corresponds to the #GdaVconnectionDataModelFilter's #idxPointer | |
| | | attribute | |
| | | * @Param4: size of @Param5 | |
| | | * @Param5: an array of #GValue, as specified by the #GdaVconnectionDataMod | |
| | | elFilter's #aConstraintUsage's #argvIndex value | |
| | | * @Returns: (transfer full): a new #GdaDataModel | |
| | | * | |
| | | * Function called to create a #GdaDataModel object, called when a virtual | |
| | | table's data need to | |
| | | * be accessed, and when optimization is handled. | |
| | | */ | |
| | | typedef GdaDataModel *(*GdaVconnectionDataModelCreateFModelFunc) (GdaVconne | |
| | | ctionDataModelSpec *, int, const char *, int, GValue **); | |
| | | | |
| | | /** | |
| | | * GdaVconnectionDataModelSpec: | |
| | | * @data_model: a #GdaDataModel, or %NULL | |
| | | * @create_columns_func: a pointer to a #GdaVconnectionDataModelCreateColum | |
| | | nsFunc function, or %NULL | |
| | | * @create_model_func: a pointer to a #GdaVconnectionDataModelCreateModelFu | |
| | | nc function, or %NULL | |
| | | * @create_filter_func: a pointer to a #GdaVconnectionDataModelParseFilterF | |
| | | unc function, or %NULL | |
| | | * @create_filtered_model_func: a pointer to a #GdaVconnectionDataModelCrea | |
| | | teFModelFunc function, or %NULL | |
| | | * | |
| | | * This structure holds all the information supplied to declare a virtual t | |
| | | able using | |
| | | * gda_vconnection_data_model_add(). You don't need to provider pointers fo | |
| | | r all the functions and | |
| | | * for @data_model, but the following rules have to be respected: | |
| | | * <itemizedlist> | |
| | | * <listitem><para>@data_model is not %NULL and all the function pointers | |
| | | are %NULL: this is the situation | |
| | | * when the virtual table's contents is defined once by @data_model</para | |
| | | ></listitem> | |
| | | * <listitem><para>@data_model is %NULL and @create_columns_func is not %N | |
| | | ULL: | |
| | | * <itemizedlist> | |
| | | * <listitem><para>@create_filtered_model_func is not %NULL: this is | |
| | | the situation where the | |
| | | * virtual table's associated data model handles fil | |
| | | ter optimizations. | |
| | | * @create_model_func is ignored in this case. | |
| | | * </para></listitem> | |
| | | * <listitem><para>@create_model_func is not %NULL: this is the situ | |
| | | ation where the | |
| | | * virtual table's associated data model does not ha | |
| | | ndle filter optimizations | |
| | | * </para></listitem> | |
| | | * </itemizedlist> | |
| | | * </para></listitem> | |
| | | * </itemizedlist> | |
| | | * | |
| | | * Note that if specifying a @create_filtered_model_func, you should also s | |
| | | pecifiy a @create_filter_func | |
| | | * function which is actually responsible for analysing the optimization. | |
| | | */ | |
| | | | |
| struct _GdaVconnectionDataModelSpec { | | struct _GdaVconnectionDataModelSpec { | |
| GdaDataModel *data_model; | | GdaDataModel *data_model; | |
| GdaVconnectionDataModelCreateColumnsFunc create_columns_func; | | GdaVconnectionDataModelCreateColumnsFunc create_columns_func; | |
| GdaVconnectionDataModelCreateModelFunc create_model_func; | | GdaVconnectionDataModelCreateModelFunc create_model_func; | |
| | | | |
| GdaVconnectionDataModelParseFilterFunc create_filter_func; | | GdaVconnectionDataModelParseFilterFunc create_filter_func; | |
| GdaVconnectionDataModelCreateFModelFunc create_filtered_model_func
; | | GdaVconnectionDataModelCreateFModelFunc create_filtered_model_func
; | |
| }; | | }; | |
| #define GDA_VCONNECTION_DATA_MODEL_SPEC(x) ((GdaVconnectionDataModelSpec*)(
x)) | | #define GDA_VCONNECTION_DATA_MODEL_SPEC(x) ((GdaVconnectionDataModelSpec*)(
x)) | |
| | | | |
| struct _GdaVconnectionDataModel { | | struct _GdaVconnectionDataModel { | |
| GdaVirtualConnection connection; | | GdaVirtualConnection connection; | |
| GdaVconnectionDataModelPrivate *priv; | | GdaVconnectionDataModelPrivate *priv; | |
| }; | | }; | |
| | | | |
| struct _GdaVconnectionDataModelClass { | | struct _GdaVconnectionDataModelClass { | |
| GdaVirtualConnectionClass parent_class; | | GdaVirtualConnectionClass parent_class; | |
| | | | |
|
| /* Padding for future expansion */ | | void (*vtable_created) (GdaVconnectionDataM | |
| void (*_gda_reserved1) (void); | | odel *cnc, | |
| void (*_gda_reserved2) (void); | | const gchar *table | |
| | | _name); | |
| | | void (*vtable_dropped) (GdaVconnectionDataM | |
| | | odel *cnc, | |
| | | const gchar *tab | |
| | | le_name); | |
| }; | | }; | |
| | | | |
| GType gda_vconnection_data_model_get_type (void) G_GNUC_CONS
T; | | GType gda_vconnection_data_model_get_type (void) G_GNUC_CONS
T; | |
| | | | |
| gboolean gda_vconnection_data_model_add (GdaVconnectionDat
aModel *cnc, GdaVconnectionDataModelSpec *spec, | | gboolean gda_vconnection_data_model_add (GdaVconnectionDat
aModel *cnc, GdaVconnectionDataModelSpec *spec, | |
| GDestroyNotify spe
c_free_func, | | GDestroyNotify spe
c_free_func, | |
| const gchar *table
_name, GError **error); | | const gchar *table
_name, GError **error); | |
| gboolean gda_vconnection_data_model_add_model (GdaVconnectionDat
aModel *cnc, | | gboolean gda_vconnection_data_model_add_model (GdaVconnectionDat
aModel *cnc, | |
| GdaDataModel *mode
l, const gchar *table_name, GError **error); | | GdaDataModel *mode
l, const gchar *table_name, GError **error); | |
| gboolean gda_vconnection_data_model_remove (GdaVconnectionDat
aModel *cnc, const gchar *table_name, GError **error); | | gboolean gda_vconnection_data_model_remove (GdaVconnectionDat
aModel *cnc, const gchar *table_name, GError **error); | |
| | | | |
|
| | | GdaVconnectionDataModelSpec *gda_vconnection_data_model_get (GdaVconnection
DataModel *cnc, const gchar *table_name); | |
| const gchar *gda_vconnection_data_model_get_table_name (GdaVconnecti
onDataModel *cnc, GdaDataModel *model); | | const gchar *gda_vconnection_data_model_get_table_name (GdaVconnecti
onDataModel *cnc, GdaDataModel *model); | |
| GdaDataModel *gda_vconnection_data_model_get_model (GdaVconnectionDat
aModel *cnc, const gchar *table_name); | | GdaDataModel *gda_vconnection_data_model_get_model (GdaVconnectionDat
aModel *cnc, const gchar *table_name); | |
| | | | |
| void gda_vconnection_data_model_foreach (GdaVconnectionDat
aModel *cnc, | | void gda_vconnection_data_model_foreach (GdaVconnectionDat
aModel *cnc, | |
| GdaVconnectionData
ModelFunc func, gpointer data); | | GdaVconnectionData
ModelFunc func, gpointer data); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 25 lines changed or deleted | | 137 lines changed or added | |
|