Top |
Functions
Functions
GOM_REPOSITORY_CONST()
#define GOM_REPOSITORY_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOM_TYPE_REPOSITORY, GomRepository const))
GomRepositoryMigrator ()
gboolean (*GomRepositoryMigrator) (GomRepository *repository
,GomAdapter *adapter
,guint version
,gpointer user_data
,GError **error
);
gom_repository_get_adapter ()
GomAdapter *
gom_repository_get_adapter (GomRepository *repository
);
Fetches the underlying adapter.
gom_repository_migrate_sync ()
gboolean gom_repository_migrate_sync (GomRepository *repository
,guint version
,GomRepositoryMigrator migrator
,gpointer migrator_data
,GError **error
);
Performs a migration on the underlying database. This will
call migrator
from the SQLite thread for each migration to perform.
Parameters
repository |
[in] | |
version |
The version to migrate to. |
[in] |
migrator |
A function to perform the migrations. |
[in][scope call] |
migrator_data |
User data for |
[in] |
error |
a GError |
gom_repository_migrate_async ()
void gom_repository_migrate_async (GomRepository *repository
,guint version
,GomRepositoryMigrator migrator
,gpointer migrator_data
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously performs a migration on the underlying database. This will
call migrator
from the SQLite thread for each migration to perform.
Upon completion, callback
will be executed and it must call
gom_repository_migrate_finish()
.
gom_repository_migrate_finish ()
gboolean gom_repository_migrate_finish (GomRepository *repository
,GAsyncResult *result
,GError **error
);
gom_repository_automatic_migrate_sync ()
gboolean gom_repository_automatic_migrate_sync (GomRepository *repository
,guint version
,GList *object_types
,GError **error
);
Performs an automatic migration on the underlying database. For
each of the GType passed in object_types
, the table will be
created if necessary, and each of the columns corresponding to
properties will be added if needed.
Parameters
repository |
[in] | |
version |
The version to migrate to. |
[in] |
object_types |
[element-type GType][transfer container] | |
error |
a GError |
gom_repository_automatic_migrate_async ()
void gom_repository_automatic_migrate_async (GomRepository *repository
,guint version
,GList *object_types
,GAsyncReadyCallback callback
,gpointer user_data
);
Performs an automatic migration on the underlying database. See
gom_repository_automatic_migrate_sync()
for details.
Upon completion, callback
will be executed and it must call
gom_repository_automatic_migrate_finish()
.
gom_repository_automatic_migrate_finish ()
gboolean gom_repository_automatic_migrate_finish (GomRepository *repository
,GAsyncResult *result
,GError **error
);
gom_repository_find_one_sync ()
GomResource * gom_repository_find_one_sync (GomRepository *repository
,GType resource_type
,GomFilter *filter
,GError **error
);
Synchronous version of gom_repository_find_async()
.
gom_repository_find_one_async ()
void gom_repository_find_one_async (GomRepository *repository
,GType resource_type
,GomFilter *filter
,GAsyncReadyCallback callback
,gpointer user_data
);
gom_repository_find_one_finish ()
GomResource * gom_repository_find_one_finish (GomRepository *repository
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to find a single resource in the
repository. See gom_repository_find_one_async()
for more info.
gom_repository_find_sync ()
GomResourceGroup * gom_repository_find_sync (GomRepository *repository
,GType resource_type
,GomFilter *filter
,GError **error
);
Synchronously queries the GomRepository for objects matching the
requested query. This must only be run from a callback provided to
gom_adapter_queue_read()
.
Parameters
repository |
[in] | |
resource_type |
The GType of the resources to query. |
[in] |
filter |
An optional filter for the query. |
[in][allow-none] |
error |
[out] |
gom_repository_find_async ()
void gom_repository_find_async (GomRepository *repository
,GType resource_type
,GomFilter *filter
,GAsyncReadyCallback callback
,gpointer user_data
);
gom_repository_find_finish ()
GomResourceGroup * gom_repository_find_finish (GomRepository *repository
,GAsyncResult *result
,GError **error
);
Completes an asynchronous request to fetch a group of resources.
Property Details
The “adapter”
property
“adapter” GomAdapter *
The adapter for the repository.
Flags: Read / Write / Construct Only