GomResource

## GomResource GomResource |

## Functions

#define | GOM_RESOURCE_CONST()
GBytes * | (*GomResourceToBytesFunc) ()
void | (*GomResourceFromBytesFunc) ()
GQuark | gom_resource_new_in_version_quark ()
GQuark | gom_resource_not_mapped_quark ()
GQuark | gom_resource_to_bytes_func_quark ()
GQuark | gom_resource_from_bytes_func_quark ()
GQuark | gom_resource_ref_table_class ()
GQuark | gom_resource_ref_property_name ()
GQuark | gom_resource_unique ()
GQuark | gom_resource_notnull ()
void | gom_resource_class_set_table ()
void | gom_resource_class_set_primary_key ()
void | gom_resource_class_set_property_new_in_version ()
void | gom_resource_class_set_property_set_mapped ()
void | gom_resource_class_set_property_transform ()
void | gom_resource_class_set_property_to_bytes ()
void | gom_resource_class_set_property_from_bytes ()
void | gom_resource_class_set_reference ()
void | gom_resource_class_set_unique ()
void | gom_resource_class_set_notnull ()
void | gom_resource_delete_async ()
gboolean | gom_resource_delete_finish ()
gboolean | gom_resource_delete_sync ()
void | gom_resource_save_async ()
gboolean | gom_resource_save_finish ()
gboolean | gom_resource_save_sync ()
void | gom_resource_fetch_m2m_async ()
GomResourceGroup * | gom_resource_fetch_m2m_finish ()

## Properties

GomRepository * | repository | Read / Write

## Types and Values

#define | GOM_RESOURCE_NEW_IN_VERSION
#define | GOM_RESOURCE_NOT_MAPPED
#define | GOM_RESOURCE_TO_BYTES_FUNC
#define | GOM_RESOURCE_FROM_BYTES_FUNC
#define | GOM_RESOURCE_REF_TABLE_CLASS
#define | GOM_RESOURCE_REF_PROPERTY_NAME
#define | GOM_RESOURCE_UNIQUE
#define | GOM_RESOURCE_NOTNULL

## Object Hierarchy

        GObject
        ╰── GomResource

## Description

## Functions

### GOM_RESOURCE_CONST()

    #define GOM_RESOURCE_CONST(obj)      (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOM_TYPE_RESOURCE, GomResource const))

### GomResourceToBytesFunc ()

    GBytes *
    (*GomResourceToBytesFunc) (GValue *value);

### GomResourceFromBytesFunc ()

    void
    (*GomResourceFromBytesFunc) (GBytes *bytes,
                                 GValue *value);

### gom_resource_new_in_version_quark ()

    GQuark
    gom_resource_new_in_version_quark (void);

### gom_resource_not_mapped_quark ()

    GQuark
    gom_resource_not_mapped_quark (void);

### gom_resource_to_bytes_func_quark ()

    GQuark
    gom_resource_to_bytes_func_quark (void);

### gom_resource_from_bytes_func_quark ()

    GQuark
    gom_resource_from_bytes_func_quark (void);

### gom_resource_ref_table_class ()

    GQuark
    gom_resource_ref_table_class (void);

### gom_resource_ref_property_name ()

    GQuark
    gom_resource_ref_property_name (void);

### gom_resource_unique ()

    GQuark
    gom_resource_unique (void);

### gom_resource_notnull ()

    GQuark
    gom_resource_notnull (void);

### gom_resource_class_set_table ()

    void
    gom_resource_class_set_table (GomResourceClass *resource_class,
                                  const gchar *table);

### gom_resource_class_set_primary_key ()

    void
    gom_resource_class_set_primary_key (GomResourceClass *resource_class,
                                        const gchar *primary_key);

### gom_resource_class_set_property_new_in_version ()

    void
    gom_resource_class_set_property_new_in_version
                                   (GomResourceClass *resource_class,
                                    const gchar *property_name,
                                    guint version);

### gom_resource_class_set_property_set_mapped ()

    void
    gom_resource_class_set_property_set_mapped
                                   (GomResourceClass *resource_class,
                                    const gchar *property_name,
                                    gboolean is_mapped);

### gom_resource_class_set_property_transform ()

    void
    gom_resource_class_set_property_transform
                                   (GomResourceClass *resource_class,
                                    const gchar *property_name,
                                    GomResourceToBytesFunc to_bytes_func,
                                    GomResourceFromBytesFunc from_bytes_func);

[skip]

### gom_resource_class_set_property_to_bytes ()

    void
    gom_resource_class_set_property_to_bytes
                                   (GomResourceClass *resource_class,
                                    const gchar *property_name,
                                    GomResourceToBytesFunc to_bytes_func,
                                    GDestroyNotify notify);

### gom_resource_class_set_property_from_bytes ()

    void
    gom_resource_class_set_property_from_bytes
                                   (GomResourceClass *resource_class,
                                    const gchar *property_name,
                                    GomResourceFromBytesFunc from_bytes_func,
                                    GDestroyNotify notify);

### gom_resource_class_set_reference ()

    void
    gom_resource_class_set_reference (GomResourceClass *resource_class,
                                      const gchar *property_name,
                                      const gchar *ref_table_name,
                                      const gchar *ref_property_name);

### gom_resource_class_set_unique ()

    void
    gom_resource_class_set_unique (GomResourceClass *resource_class,
                                   const gchar *property_name);

### gom_resource_class_set_notnull ()

    void
    gom_resource_class_set_notnull (GomResourceClass *resource_class,
                                    const gchar *property_name);

### gom_resource_delete_async ()

    void
    gom_resource_delete_async (GomResource *resource,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

### gom_resource_delete_finish ()

    gboolean
    gom_resource_delete_finish (GomResource *resource,
                                GAsyncResult *result,
                                GError **error);

### gom_resource_delete_sync ()

    gboolean
    gom_resource_delete_sync (GomResource *resource,
                              GError **error);

Synchronously deletes a resource. This may only be called from inside a callback to `gom_adapter_queue_write()`.

#### Parameters

resource | A GomResource. | [in]
error | A location for a GError, or `NULL`. | [out]

#### Returns

`TRUE` if successful; otherwise `FALSE` and `error` is set.

### gom_resource_save_async ()

    void
    gom_resource_save_async (GomResource *resource,
                             GAsyncReadyCallback callback,
                             gpointer user_data);

### gom_resource_save_finish ()

    gboolean
    gom_resource_save_finish (GomResource *resource,
                              GAsyncResult *result,
                              GError **error);

### gom_resource_save_sync ()

    gboolean
    gom_resource_save_sync (GomResource *resource,
                            GError **error);

#### Parameters

resource | A GomResource. | [in]
error | A location for a GError, or `NULL`. | [out]

#### Returns

`TRUE` if successful; otherwise `FALSE`.

### gom_resource_fetch_m2m_async ()

    void
    gom_resource_fetch_m2m_async (GomResource *resource,
                                  GType resource_type,
                                  const gchar *m2m_table,
                                  GomFilter *filter,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

### gom_resource_fetch_m2m_finish ()

    GomResourceGroup *
    gom_resource_fetch_m2m_finish (GomResource *resource,
                                   GAsyncResult *result,
                                   GError **error);

Completes the asynchronous request to fetch a group of resources that are related to the resource through a many-to-many table.

#### Parameters

resource | A GomResource. | [in]
result | A GAsyncResult. | [in]
error | A location for a GError, or `NULL`. | [out]

#### Returns

A GomResourceGroup.

[transfer full]

## Types and Values

### GOM_RESOURCE_NEW_IN_VERSION

    #define GOM_RESOURCE_NEW_IN_VERSION  (gom_resource_new_in_version_quark())

### GOM_RESOURCE_NOT_MAPPED

    #define GOM_RESOURCE_NOT_MAPPED      (gom_resource_not_mapped_quark())

### GOM_RESOURCE_TO_BYTES_FUNC

    #define GOM_RESOURCE_TO_BYTES_FUNC   (gom_resource_to_bytes_func_quark())

### GOM_RESOURCE_FROM_BYTES_FUNC

    #define GOM_RESOURCE_FROM_BYTES_FUNC (gom_resource_from_bytes_func_quark())

### GOM_RESOURCE_REF_TABLE_CLASS

    #define GOM_RESOURCE_REF_TABLE_CLASS (gom_resource_ref_table_class())

### GOM_RESOURCE_REF_PROPERTY_NAME

    #define GOM_RESOURCE_REF_PROPERTY_NAME (gom_resource_ref_property_name())

### GOM_RESOURCE_UNIQUE

    #define GOM_RESOURCE_UNIQUE          (gom_resource_unique())

### GOM_RESOURCE_NOTNULL

    #define GOM_RESOURCE_NOTNULL         (gom_resource_notnull())

## Property Details

### The `“repository”` property

      “repository”               GomRepository *

The resources repository.

Flags: Read / Write