get method
Gets the object referred to by this db object and identified by the id
from the database. While getting the object it also performs the
specified lookups. If the id
of the db object is not specified, it
returns an error.
If the client library key is set to enforce session, an active user session is required (e.g., user needs to be logged in) to call this method.
lookups
The list of lookups to make (left outer join) while getting the
object from the database. lookups
's elements can be SimpleLookup or
ComplexLookup.
options
Get operation options. By default no caching of the retrieved
object in Redis store.
Returns the object identified by the id
or null if no such
object exists in the database
Implementation
Future<APIResponse<Map<String, dynamic>>> get(
{List<Lookup>? lookups, GetOptions? options}) =>
_fetcher.post<Map<String, dynamic>>('/_api/rest/v1/db/object/get', body: {
'options': DEFAULT_GET_OPTIONS.merge(options).toJson(),
'id': _id,
'lookups': lookups?.map((e) => e.toJson()).toList(),
'model': _modelName
});