fromJsonRepresentation static method

FutureOr<Query> fromJsonRepresentation(
  1. Database database,
  2. String jsonRepresentation
)

Creates a Query from the Query.jsonRepresentation of a query.

Implementation

static FutureOr<Query> fromJsonRepresentation(
  Database database,
  String jsonRepresentation,
) {
  if (database is AsyncDatabase) {
    return Query.fromJsonRepresentationAsync(database, jsonRepresentation);
  }

  if (database is SyncDatabase) {
    return Query.fromJsonRepresentationSync(database, jsonRepresentation);
  }

  throw UnimplementedError();
}