getReadQuery method

Query getReadQuery(
  1. String id, {
  2. @Deprecated('Do not use type anymore. Prefer entityName') Type? type,
  3. required String entityName,
})
inherited

generates a query that execute a read operation on the database for an object with a given id.

Implementation

Query getReadQuery(
  String id, {
  @Deprecated('Do not use type anymore. Prefer entityName') Type? type,
  required String entityName,
}) =>
    Query(
      entityName: entityName,
      action: QueryAction.read,
      payload: {"id": id},
      limit: 1,
    );