Class

GomSession

Description [src]

abstract class Gom.Session : GObject.Object
{
  /* No available fields */
}

A transaction-scoped context for loading, mutating, and tracking entities.

Sessions provide a sticky identity map for entities materialized through the same repository/driver pair. Repeated materialization of the same row within a session returns the same in-memory entity instance until the session is committed or rolled back.

Hierarchy

hierarchy this GomSession ancestor_0 GObject ancestor_0--this

Ancestors

Instance methods

gom_session_commit

Commits the transaction associated with self and closes the session.

gom_session_dup_coordinator

Gets the sync coordinator from the session’s repository.

gom_session_dup_repository

Gets the repository that created the session.

gom_session_find_one

Finds the first entity of entity_type matching all provided property/value pairs through self.

gom_session_find_one_with_properties

Finds the first entity of entity_type matching all provided property/value pairs through self.

gom_session_flush

Flushes pending session changes to the backend.

gom_session_insert_entity

Persists entity in self and flushes the session.

gom_session_list_entities

Builds a session-scoped query for entity_type, applies the optional filter and ordering, and returns all matching entities as a list model.

gom_session_list_query

Creates a lazy entity list model for query.

gom_session_list_records

Creates a lazy record list model for query.

gom_session_mutate

Runs mutation through the session’s backend and returns a future for the mutation result.

gom_session_persist

Stages entity for persistence within the session.

gom_session_query

Runs query through the session’s backend and returns a cursor future.

gom_session_rollback

Rolls back the transaction associated with self and closes the session.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Signals

Gom.Session::changed

Emitted when the session has changed state.

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct GomSessionClass {
  /* no available fields */
}

Abstract class vtable used by backend implementations.