![]() |
![]() |
![]() |
GNOME Data Access 5 manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
struct GdaVconnectionDataModel; void (*GdaVconnectionDataModelFunc) (GdaDataModel *Param1
,const gchar *Param2
,gpointer Param3
); struct GdaVconnectionDataModelSpec; GList * (*GdaVconnectionDataModelCreateColumnsFunc) (GdaVconnectionDataModelSpec *Param1
,GError **Param2
); GdaDataModel * (*GdaVconnectionDataModelCreateModelFunc) (GdaVconnectionDataModelSpec *Param1
); gboolean gda_vconnection_data_model_add (GdaVconnectionDataModel *cnc
,GdaVconnectionDataModelSpec *spec
,GDestroyNotify spec_free_func
,const gchar *table_name
,GError **error
); gboolean gda_vconnection_data_model_add_model (GdaVconnectionDataModel *cnc
,GdaDataModel *model
,const gchar *table_name
,GError **error
); gboolean gda_vconnection_data_model_remove (GdaVconnectionDataModel *cnc
,const gchar *table_name
,GError **error
); const gchar * gda_vconnection_data_model_get_table_name (GdaVconnectionDataModel *cnc
,GdaDataModel *model
); GdaDataModel * gda_vconnection_data_model_get_model (GdaVconnectionDataModel *cnc
,const gchar *table_name
); void gda_vconnection_data_model_foreach (GdaVconnectionDataModel *cnc
,GdaVconnectionDataModelFunc func
,gpointer data
);
GObject +----GdaConnection +----GdaVirtualConnection +----GdaVconnectionDataModel +----GdaVconnectionHub
void (*GdaVconnectionDataModelFunc) (GdaDataModel *Param1
,const gchar *Param2
,gpointer Param3
);
struct GdaVconnectionDataModelSpec { GdaDataModel *data_model; GdaVconnectionDataModelCreateColumnsFunc create_columns_func; GdaVconnectionDataModelCreateModelFunc create_model_func; GdaVconnectionDataModelParseFilterFunc create_filter_func; GdaVconnectionDataModelCreateFModelFunc create_filtered_model_func; };
GList * (*GdaVconnectionDataModelCreateColumnsFunc) (GdaVconnectionDataModelSpec *Param1
,GError **Param2
);
GdaDataModel * (*GdaVconnectionDataModelCreateModelFunc)
(GdaVconnectionDataModelSpec *Param1
);
gboolean gda_vconnection_data_model_add (GdaVconnectionDataModel *cnc
,GdaVconnectionDataModelSpec *spec
,GDestroyNotify spec_free_func
,const gchar *table_name
,GError **error
);
Create a new virtual table named table_name
in cnc
. The contents of that new table
is dictated by what's in spec
.
If there is just one GdaDataModel to make appear as a table
then the gda_vconnection_data_model_add_model()
method is easier to use.
|
a GdaVconnectionDataModel connection |
|
a GdaVconnectionDataModelSpec structure |
|
function to call when freeing spec , or NULL
|
|
the name of the table |
|
a place to store errors, or NULL
|
Returns : |
TRUE if no error occurred |
gboolean gda_vconnection_data_model_add_model (GdaVconnectionDataModel *cnc
,GdaDataModel *model
,const gchar *table_name
,GError **error
);
Make model
appear as a table named table_name
in the cnc
connection (as if a
"CREATE TABLE..." statement was executed, except that the data contained within model
is actually used when table_name
's contents is read or written).
For a more general approach, see the gda_vconnection_data_model_add()
method.
|
a GdaVconnectionDataModel connection |
|
a GdaDataModel |
|
the name of the table |
|
a place to store errors, or NULL
|
Returns : |
TRUE if no error occurred |
gboolean gda_vconnection_data_model_remove (GdaVconnectionDataModel *cnc
,const gchar *table_name
,GError **error
);
Remove the table named table_name
in the cnc
connection (as if a "DROP TABLE..."
statement was executed, except that no data gets destroyed as the associated data model remains the same).
|
a GdaVconnectionDataModel connection |
|
the name of the table to remove from cnc
|
|
a place to store errors, or NULL
|
Returns : |
TRUE if no error occurred |
const gchar * gda_vconnection_data_model_get_table_name (GdaVconnectionDataModel *cnc
,GdaDataModel *model
);
Find the name of the table associated to model
in cnc
|
a GdaVconnectionDataModel connection |
|
a GdaDataModel representing a table within cnc
|
Returns : |
the table name, or NULL if not found |
GdaDataModel * gda_vconnection_data_model_get_model (GdaVconnectionDataModel *cnc
,const gchar *table_name
);
Find the GdaDataModel object representing the table_name
table in cnc
|
a GdaVconnectionDataModel connection |
|
a table name within cnc
|
Returns : |
the GdaDataModel, or NULL if no table named table_name exists |
void gda_vconnection_data_model_foreach (GdaVconnectionDataModel *cnc
,GdaVconnectionDataModelFunc func
,gpointer data
);
Call func
for each table in cnc
.
Warning: func
will be called for any table present in cnc
even if no data
model represents the contents of the table (which means the 1st argument of func
may be NULL
)
|
a GdaVconnectionDataModel connection |
|
a GdaVconnectionDataModelFunc function pointer |
|
data to pass to func calls |