Gom.Resource

g GObject.Object GObject.Object Gom.Resource Gom.Resource GObject.Object->Gom.Resource

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

Gom.ResourceClass (9), GObject.ObjectClass (5)

class

from_bytes_func_quark ()

class

new_in_version_quark ()

class

not_mapped_quark ()

class

notnull ()

class

ref_property_name ()

class

ref_table_class ()

class

set_notnull (property_name)

class

set_primary_key (primary_key)

class

set_property_from_bytes (property_name, from_bytes_func)

class

set_property_new_in_version (property_name, version)

class

set_property_set_mapped (property_name, is_mapped)

class

set_property_to_bytes (property_name, to_bytes_func)

class

set_reference (property_name, ref_table_name, ref_property_name)

class

set_table (table)

class

set_unique (property_name)

class

to_bytes_func_quark ()

class

unique ()

delete_async (callback, *user_data)

delete_finish (result)

delete_sync ()

fetch_m2m_async (resource_type, m2m_table, filter, callback, *user_data)

fetch_m2m_finish (result)

save_async (callback, *user_data)

save_finish (result)

save_sync ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

repository

Gom.Repository

r/w

The resources repository.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Gom.Resource(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Gom.ResourceClass

classmethod from_bytes_func_quark()
Return type:

int

classmethod new_in_version_quark()
Return type:

int

classmethod not_mapped_quark()
Return type:

int

classmethod notnull()
Return type:

int

classmethod ref_property_name()
Return type:

int

classmethod ref_table_class()
Return type:

int

classmethod set_notnull(property_name)
Parameters:

property_name (str) –

classmethod set_primary_key(primary_key)
Parameters:

primary_key (str) –

classmethod set_property_from_bytes(property_name, from_bytes_func)
Parameters:
classmethod set_property_new_in_version(property_name, version)
Parameters:
  • property_name (str) –

  • version (int) –

classmethod set_property_set_mapped(property_name, is_mapped)
Parameters:
  • property_name (str) –

  • is_mapped (bool) –

classmethod set_property_to_bytes(property_name, to_bytes_func)
Parameters:
classmethod set_reference(property_name, ref_table_name, ref_property_name)
Parameters:
  • property_name (str) –

  • ref_table_name (str) –

  • ref_property_name (str) –

classmethod set_table(table)
Parameters:

table (str) –

classmethod set_unique(property_name)
Parameters:

property_name (str) –

classmethod to_bytes_func_quark()
Return type:

int

classmethod unique()
Return type:

int

delete_async(callback, *user_data)
Parameters:
delete_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

delete_sync()
Raises:

GLib.Error

Returns:

True if successful; otherwise False and error is set.

Return type:

bool

Synchronously deletes a resource. This may only be called from inside a callback to Gom.Adapter.queue_write().

fetch_m2m_async(resource_type, m2m_table, filter, callback, *user_data)
Parameters:
fetch_m2m_finish(result)
Parameters:

result (Gio.AsyncResult) – A Gio.AsyncResult.

Raises:

GLib.Error

Returns:

A Gom.ResourceGroup.

Return type:

Gom.ResourceGroup

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

save_async(callback, *user_data)
Parameters:
save_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

save_sync()
Raises:

GLib.Error

Returns:

True if successful; otherwise False.

Return type:

bool

Property Details

Gom.Resource.props.repository
Name:

repository

Type:

Gom.Repository

Default Value:

None

Flags:

READABLE, WRITABLE

The resources repository.