UNPKG

rollun-ts-rql

Version:

RQL query object and serializer written in TypeScript

31 lines (30 loc) 1.14 kB
import Query from './Query'; import Select from './nodes/Select'; import Limit from './nodes/Limit'; import Sort from './nodes/Sort'; import AbstractNode from './nodes/AbstractNode'; import GroupBy from './nodes/GroupBy'; export default class QueryStringifier { static stringify(query: Query): string; protected static encodeRql(value: string): string; protected static parseTopLevelNode(key: string, node: AbstractNode): any; protected static parseGroupNode(node?: GroupBy): string; protected static parseSelectNode(node?: Select): string; protected static parseSortNode(node?: Sort): string; protected static parseLimitNode(node?: Limit): string; protected static parseQueryNode(node?: AbstractNode): string; /** * Returns type `string:` if it is string, anf empty string, otherwise * @param value * @private */ private static withType; /** * Encodes rql value and replaces empty strings and `null` with null() * @param value * @param isField * @private */ private static withEncoding; protected static addUnion(queryString: string): string; }