| Top |  |  |  |  | 
#define GOM_REPOSITORY_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOM_TYPE_REPOSITORY, GomRepository const))
gboolean (*GomRepositoryMigrator) (GomRepository *repository,GomAdapter *adapter,guint version,gpointer user_data,GError **error);
GomAdapter *
gom_repository_get_adapter (GomRepository *repository);
Fetches the underlying adapter.
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.
| 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 | 
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().
gboolean gom_repository_migrate_finish (GomRepository *repository,GAsyncResult *result,GError **error);
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.
| repository | [in] | |
| version | The version to migrate to. | [in] | 
| object_types | [element-type GType][transfer container] | |
| error | a GError | 
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().
gboolean gom_repository_automatic_migrate_finish (GomRepository *repository,GAsyncResult *result,GError **error);
GomResource * gom_repository_find_one_sync (GomRepository *repository,GType resource_type,GomFilter *filter,GError **error);
Synchronous version of gom_repository_find_async().
void gom_repository_find_one_async (GomRepository *repository,GType resource_type,GomFilter *filter,GAsyncReadyCallback callback,gpointer user_data);
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.
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().
| repository | [in] | |
| resource_type | The GType of the resources to query. | [in] | 
| filter | An optional filter for the query. | [in][allow-none] | 
| error | [out] | 
GomResourceGroup * gom_repository_find_sorted_sync (GomRepository *repository,GType resource_type,GomFilter *filter,GomSorting *sorting,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().
| repository | [in] | |
| resource_type | The GType of the resources to query. | [in] | 
| filter | An optional filter for the query. | [in][allow-none] | 
| sorting | An optional GomSorting to order the query results. | [in][allow-none] | 
| error | [out] | 
void gom_repository_find_async (GomRepository *repository,GType resource_type,GomFilter *filter,GAsyncReadyCallback callback,gpointer user_data);
void gom_repository_find_sorted_async (GomRepository *repository,GType resource_type,GomFilter *filter,GomSorting *sorting,GAsyncReadyCallback callback,gpointer user_data);
GomResourceGroup * gom_repository_find_finish (GomRepository *repository,GAsyncResult *result,GError **error);
Completes an asynchronous request to fetch a group of resources.
“adapter” property“adapter” GomAdapter *
The adapter for the repository.
Flags: Read / Write / Construct Only