UNPKG

reduct-js

Version:

ReductStore Client SDK for Javascript/NodeJS/Typescript

30 lines (29 loc) 883 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QueryOptions = exports.QueryType = void 0; var QueryType; (function (QueryType) { QueryType[QueryType["QUERY"] = 0] = "QUERY"; QueryType[QueryType["REMOVE"] = 1] = "REMOVE"; })(QueryType = exports.QueryType || (exports.QueryType = {})); /** * Options for querying records */ class QueryOptions { static serialize(queryType, data) { return { query_type: QueryType[queryType], ttl: data.ttl, include: data.include, exclude: data.exclude, each_s: data.eachS, each_n: data.eachN, limit: data.limit, continuous: data.continuous, when: data.when, strict: data.strict, only_metadata: data.head, }; } } exports.QueryOptions = QueryOptions;