Gom.ResourceGroup

g GObject.Object GObject.Object Gom.ResourceGroup Gom.ResourceGroup GObject.Object->Gom.ResourceGroup

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (repository)

append (resource)

delete_async (callback, *user_data)

delete_finish (result)

delete_sync ()

fetch_async (index_, count, callback, *user_data)

fetch_finish (result)

fetch_sync (index_, count)

get_count ()

get_index (index_)

get_m2m_table ()

write_async (callback, *user_data)

write_finish (result)

write_sync ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

count

int

r/w/co

The size of the resource group.

filter

Gom.Filter

r/w/co

The query filter.

is-writable

bool

r/w/co

Whether the group contains resources to be written.

m2m-table

str

r/w/co

The table used to join a Many to Many query.

m2m-type

GObject.GType

r/w/co

The type used in the m2m-table join.

repository

Gom.Repository

r/w/co

The repository for object storage.

resource-type

GObject.GType

r/w/co

The type of resources contained.

sorting

Gom.Sorting

r/w/co

The query sorting.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Gom.ResourceGroup(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gom.ResourceGroupClass

classmethod new(repository)
Parameters:

repository (Gom.Repository) –

Return type:

Gom.ResourceGroup

append(resource)
Parameters:

resource (Gom.Resource) –

Return type:

bool

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

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

delete_sync()
Raises:

GLib.Error

Return type:

bool

fetch_async(index_, count, callback, *user_data)
Parameters:
fetch_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

fetch_sync(index_, count)
Parameters:
  • index (int) – The first index to fetch.

  • count (int) – The number of indexes to fetch.

Raises:

GLib.Error

Returns:

True if successful; otherwise False and error is set.

Return type:

bool

Fetches a sequence of resources from the group synchronously. This must be called from an adapter read callback using Gom.Adapter.queue_read().

get_count()
Return type:

int

get_index(index_)
Parameters:

index (int) – The index of the resource.

Returns:

A Gom.Resource.

Return type:

Gom.Resource

Fetches the resource at index_. You must have loaded that resource by calling Gom.ResourceGroup.fetch_async() with a range inclusive of the index.

get_m2m_table()
Return type:

str

write_async(callback, *user_data)
Parameters:
write_finish(result)
Parameters:

result (Gio.AsyncResult) –

Raises:

GLib.Error

Return type:

bool

write_sync()
Raises:

GLib.Error

Return type:

bool

Property Details

Gom.ResourceGroup.props.count
Name:

count

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The size of the resource group.

Gom.ResourceGroup.props.filter
Name:

filter

Type:

Gom.Filter

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The query filter.

Gom.ResourceGroup.props.is_writable
Name:

is-writable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Whether the group contains resources to be written.

Gom.ResourceGroup.props.m2m_table
Name:

m2m-table

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The table used to join a Many to Many query.

Gom.ResourceGroup.props.m2m_type
Name:

m2m-type

Type:

GObject.GType

Default Value:

<GType GomResource>

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The type used in the m2m-table join.

Gom.ResourceGroup.props.repository
Name:

repository

Type:

Gom.Repository

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The repository for object storage.

Gom.ResourceGroup.props.resource_type
Name:

resource-type

Type:

GObject.GType

Default Value:

<GType GomResource>

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The type of resources contained.

Gom.ResourceGroup.props.sorting
Name:

sorting

Type:

Gom.Sorting

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The query sorting.