flowquery 1.0.2 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -1
- package/dist/compute/runner.d.ts +81 -0
- package/dist/compute/runner.d.ts.map +1 -0
- package/dist/index.browser.d.ts +10 -0
- package/dist/index.browser.d.ts.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.node.d.ts +14 -0
- package/dist/index.node.d.ts.map +1 -0
- package/dist/io/command_line.d.ts +28 -0
- package/dist/io/command_line.d.ts.map +1 -0
- package/dist/parsing/alias.d.ts +10 -0
- package/dist/parsing/alias.d.ts.map +1 -0
- package/dist/parsing/alias_option.d.ts +6 -0
- package/dist/parsing/alias_option.d.ts.map +1 -0
- package/dist/parsing/ast_node.d.ts +100 -0
- package/dist/parsing/ast_node.d.ts.map +1 -0
- package/dist/parsing/base_parser.d.ts +49 -0
- package/dist/parsing/base_parser.d.ts.map +1 -0
- package/dist/parsing/components/csv.d.ts +6 -0
- package/dist/parsing/components/csv.d.ts.map +1 -0
- package/dist/parsing/components/from.d.ts +7 -0
- package/dist/parsing/components/from.d.ts.map +1 -0
- package/dist/parsing/components/headers.d.ts +7 -0
- package/dist/parsing/components/headers.d.ts.map +1 -0
- package/dist/parsing/components/json.d.ts +6 -0
- package/dist/parsing/components/json.d.ts.map +1 -0
- package/dist/parsing/components/null.d.ts +6 -0
- package/dist/parsing/components/null.d.ts.map +1 -0
- package/dist/parsing/components/post.d.ts +6 -0
- package/dist/parsing/components/post.d.ts.map +1 -0
- package/dist/parsing/components/text.d.ts +6 -0
- package/dist/parsing/components/text.d.ts.map +1 -0
- package/dist/parsing/context.d.ts +38 -0
- package/dist/parsing/context.d.ts.map +1 -0
- package/dist/parsing/data_structures/associative_array.d.ts +28 -0
- package/dist/parsing/data_structures/associative_array.d.ts.map +1 -0
- package/dist/parsing/data_structures/json_array.d.ts +26 -0
- package/dist/parsing/data_structures/json_array.d.ts.map +1 -0
- package/dist/parsing/data_structures/key_value_pair.d.ts +25 -0
- package/dist/parsing/data_structures/key_value_pair.d.ts.map +1 -0
- package/dist/parsing/data_structures/lookup.d.ts +25 -0
- package/dist/parsing/data_structures/lookup.d.ts.map +1 -0
- package/dist/parsing/data_structures/range_lookup.d.ts +14 -0
- package/dist/parsing/data_structures/range_lookup.d.ts.map +1 -0
- package/dist/parsing/expressions/expression.d.ts +53 -0
- package/dist/parsing/expressions/expression.d.ts.map +1 -0
- package/dist/parsing/expressions/f_string.d.ts +21 -0
- package/dist/parsing/expressions/f_string.d.ts.map +1 -0
- package/dist/parsing/expressions/identifier.d.ts +17 -0
- package/dist/parsing/expressions/identifier.d.ts.map +1 -0
- package/dist/parsing/expressions/number.d.ts +25 -0
- package/dist/parsing/expressions/number.d.ts.map +1 -0
- package/dist/parsing/expressions/operator.d.ts +79 -0
- package/dist/parsing/expressions/operator.d.ts.map +1 -0
- package/dist/parsing/expressions/reference.d.ts +29 -0
- package/dist/parsing/expressions/reference.d.ts.map +1 -0
- package/dist/parsing/expressions/string.d.ts +23 -0
- package/dist/parsing/expressions/string.d.ts.map +1 -0
- package/dist/parsing/functions/aggregate_function.d.ts +42 -0
- package/dist/parsing/functions/aggregate_function.d.ts.map +1 -0
- package/dist/parsing/functions/async_function.d.ts +52 -0
- package/dist/parsing/functions/async_function.d.ts.map +1 -0
- package/dist/parsing/functions/avg.d.ts +15 -0
- package/dist/parsing/functions/avg.d.ts.map +1 -0
- package/dist/parsing/functions/collect.d.ts +21 -0
- package/dist/parsing/functions/collect.d.ts.map +1 -0
- package/dist/parsing/functions/function.d.ts +36 -0
- package/dist/parsing/functions/function.d.ts.map +1 -0
- package/dist/parsing/functions/function_factory.d.ts +151 -0
- package/dist/parsing/functions/function_factory.d.ts.map +1 -0
- package/dist/parsing/functions/function_metadata.d.ts +83 -0
- package/dist/parsing/functions/function_metadata.d.ts.map +1 -0
- package/dist/parsing/functions/functions.d.ts +21 -0
- package/dist/parsing/functions/functions.d.ts.map +1 -0
- package/dist/parsing/functions/join.d.ts +9 -0
- package/dist/parsing/functions/join.d.ts.map +1 -0
- package/dist/parsing/functions/predicate_function.d.ts +18 -0
- package/dist/parsing/functions/predicate_function.d.ts.map +1 -0
- package/dist/parsing/functions/predicate_function_factory.d.ts +6 -0
- package/dist/parsing/functions/predicate_function_factory.d.ts.map +1 -0
- package/dist/parsing/functions/predicate_sum.d.ts +7 -0
- package/dist/parsing/functions/predicate_sum.d.ts.map +1 -0
- package/dist/parsing/functions/rand.d.ts +7 -0
- package/dist/parsing/functions/rand.d.ts.map +1 -0
- package/dist/parsing/functions/range.d.ts +7 -0
- package/dist/parsing/functions/range.d.ts.map +1 -0
- package/dist/parsing/functions/reducer_element.d.ts +6 -0
- package/dist/parsing/functions/reducer_element.d.ts.map +1 -0
- package/dist/parsing/functions/replace.d.ts +7 -0
- package/dist/parsing/functions/replace.d.ts.map +1 -0
- package/dist/parsing/functions/round.d.ts +7 -0
- package/dist/parsing/functions/round.d.ts.map +1 -0
- package/dist/parsing/functions/size.d.ts +7 -0
- package/dist/parsing/functions/size.d.ts.map +1 -0
- package/dist/parsing/functions/split.d.ts +9 -0
- package/dist/parsing/functions/split.d.ts.map +1 -0
- package/dist/parsing/functions/stringify.d.ts +9 -0
- package/dist/parsing/functions/stringify.d.ts.map +1 -0
- package/dist/parsing/functions/sum.d.ts +14 -0
- package/dist/parsing/functions/sum.d.ts.map +1 -0
- package/dist/parsing/functions/to_json.d.ts +7 -0
- package/dist/parsing/functions/to_json.d.ts.map +1 -0
- package/dist/parsing/functions/value_holder.d.ts +8 -0
- package/dist/parsing/functions/value_holder.d.ts.map +1 -0
- package/dist/parsing/logic/case.d.ts +7 -0
- package/dist/parsing/logic/case.d.ts.map +1 -0
- package/dist/parsing/logic/else.d.ts +7 -0
- package/dist/parsing/logic/else.d.ts.map +1 -0
- package/dist/parsing/logic/end.d.ts +6 -0
- package/dist/parsing/logic/end.d.ts.map +1 -0
- package/dist/parsing/logic/then.d.ts +7 -0
- package/dist/parsing/logic/then.d.ts.map +1 -0
- package/dist/parsing/logic/when.d.ts +7 -0
- package/dist/parsing/logic/when.d.ts.map +1 -0
- package/dist/parsing/operations/aggregated_return.d.ts +8 -0
- package/dist/parsing/operations/aggregated_return.d.ts.map +1 -0
- package/dist/parsing/operations/aggregated_with.d.ts +8 -0
- package/dist/parsing/operations/aggregated_with.d.ts.map +1 -0
- package/dist/parsing/operations/group_by.d.ts +35 -0
- package/dist/parsing/operations/group_by.d.ts.map +1 -0
- package/dist/parsing/operations/limit.d.ts +10 -0
- package/dist/parsing/operations/limit.d.ts.map +1 -0
- package/dist/parsing/operations/load.d.ts +48 -0
- package/dist/parsing/operations/load.d.ts.map +1 -0
- package/dist/parsing/operations/operation.d.ts +39 -0
- package/dist/parsing/operations/operation.d.ts.map +1 -0
- package/dist/parsing/operations/projection.d.ts +8 -0
- package/dist/parsing/operations/projection.d.ts.map +1 -0
- package/dist/parsing/operations/return.d.ts +23 -0
- package/dist/parsing/operations/return.d.ts.map +1 -0
- package/dist/parsing/operations/unwind.d.ts +12 -0
- package/dist/parsing/operations/unwind.d.ts.map +1 -0
- package/dist/parsing/operations/where.d.ts +26 -0
- package/dist/parsing/operations/where.d.ts.map +1 -0
- package/dist/parsing/operations/with.d.ts +17 -0
- package/dist/parsing/operations/with.d.ts.map +1 -0
- package/dist/parsing/parser.d.ts +66 -0
- package/dist/parsing/parser.d.ts.map +1 -0
- package/dist/parsing/parser.js +1 -1
- package/dist/parsing/token_to_node.d.ts +7 -0
- package/dist/parsing/token_to_node.d.ts.map +1 -0
- package/dist/tokenization/keyword.d.ts +43 -0
- package/dist/tokenization/keyword.d.ts.map +1 -0
- package/dist/tokenization/operator.d.ts +22 -0
- package/dist/tokenization/operator.d.ts.map +1 -0
- package/dist/tokenization/string_walker.d.ts +55 -0
- package/dist/tokenization/string_walker.d.ts.map +1 -0
- package/dist/tokenization/symbol.d.ts +15 -0
- package/dist/tokenization/symbol.d.ts.map +1 -0
- package/dist/tokenization/token.d.ts +176 -0
- package/dist/tokenization/token.d.ts.map +1 -0
- package/dist/tokenization/token_mapper.d.ts +40 -0
- package/dist/tokenization/token_mapper.d.ts.map +1 -0
- package/dist/tokenization/token_mapper.js +2 -2
- package/dist/tokenization/token_mapper.js.map +1 -1
- package/dist/tokenization/token_type.d.ts +16 -0
- package/dist/tokenization/token_type.d.ts.map +1 -0
- package/dist/tokenization/tokenizer.d.ts +45 -0
- package/dist/tokenization/tokenizer.d.ts.map +1 -0
- package/dist/tokenization/trie.d.ts +41 -0
- package/dist/tokenization/trie.d.ts.map +1 -0
- package/dist/utils/object_utils.d.ts +15 -0
- package/dist/utils/object_utils.d.ts.map +1 -0
- package/dist/utils/string_utils.d.ts +51 -0
- package/dist/utils/string_utils.d.ts.map +1 -0
- package/misc/apps/RAG/README.md +48 -0
- package/misc/apps/RAG/package.json +31 -0
- package/misc/apps/RAG/src/index.ts +20 -0
- package/misc/apps/RAG/tsconfig.json +19 -0
- package/misc/apps/RAG/webpack.config.js +32 -0
- package/misc/apps/README.md +1 -0
- package/package.json +1 -1
- package/src/parsing/parser.ts +1 -1
- package/src/tokenization/token_mapper.ts +2 -2
- package/tsconfig.json +3 -1
- /package/{queries → misc/queries}/analyze_catfacts.cql +0 -0
- /package/{queries → misc/queries}/azure_openai_completions.cql +0 -0
- /package/{queries → misc/queries}/azure_openai_models.cql +0 -0
- /package/{queries → misc/queries}/mock_pipeline.cql +0 -0
- /package/{queries → misc/queries}/openai_completions.cql +0 -0
- /package/{queries → misc/queries}/openai_models.cql +0 -0
- /package/{queries → misc/queries}/test.cql +0 -0
- /package/{queries → misc/queries}/tool_inference.cql +0 -0
- /package/{queries → misc/queries}/wisdom.cql +0 -0
- /package/{queries → misc/queries}/wisdom_letter_histogram.cql +0 -0
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import Function from "./function";
|
|
2
|
+
import { FunctionMetadata, RegisterFunctionOptions, RegisterAsyncProviderOptions } from "./function_metadata";
|
|
3
|
+
/**
|
|
4
|
+
* Type for synchronous function factories.
|
|
5
|
+
*/
|
|
6
|
+
export type FunctionCreator = () => Function;
|
|
7
|
+
/**
|
|
8
|
+
* Type for async data provider functions used in LOAD operations.
|
|
9
|
+
* These functions can yield data asynchronously.
|
|
10
|
+
*/
|
|
11
|
+
export type AsyncDataProvider = (...args: any[]) => AsyncGenerator<any, void, unknown> | Promise<any>;
|
|
12
|
+
/**
|
|
13
|
+
* Factory for creating function instances by name.
|
|
14
|
+
*
|
|
15
|
+
* Maps function names (case-insensitive) to their corresponding implementation classes.
|
|
16
|
+
* Supports built-in functions like sum, avg, collect, range, split, join, etc.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const sumFunc = FunctionFactory.create("sum");
|
|
21
|
+
* const avgFunc = FunctionFactory.create("AVG");
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare class FunctionFactory {
|
|
25
|
+
/**
|
|
26
|
+
* Registry for plugin functions (synchronous).
|
|
27
|
+
*/
|
|
28
|
+
private static plugins;
|
|
29
|
+
/**
|
|
30
|
+
* Registry for async data provider functions used in LOAD operations.
|
|
31
|
+
*/
|
|
32
|
+
private static asyncProviders;
|
|
33
|
+
/**
|
|
34
|
+
* Registry for function metadata (both sync and async).
|
|
35
|
+
*/
|
|
36
|
+
private static metadata;
|
|
37
|
+
/**
|
|
38
|
+
* Registers a synchronous plugin function.
|
|
39
|
+
*
|
|
40
|
+
* @param name - The function name (will be lowercased)
|
|
41
|
+
* @param factoryOrOptions - Factory function or options object with metadata
|
|
42
|
+
*/
|
|
43
|
+
static register(name: string, factoryOrOptions: FunctionCreator | RegisterFunctionOptions): void;
|
|
44
|
+
/**
|
|
45
|
+
* Unregisters a synchronous plugin function.
|
|
46
|
+
*
|
|
47
|
+
* @param name - The function name to unregister
|
|
48
|
+
*/
|
|
49
|
+
static unregister(name: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Registers an async data provider function for use in LOAD operations.
|
|
52
|
+
*
|
|
53
|
+
* @param name - The function name (will be lowercased)
|
|
54
|
+
* @param providerOrOptions - Async provider or options object with metadata
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // Register with metadata for LLM consumption
|
|
59
|
+
* FunctionFactory.registerAsyncProvider("fetchUsers", {
|
|
60
|
+
* provider: async function* (endpoint: string) {
|
|
61
|
+
* const response = await fetch(endpoint);
|
|
62
|
+
* const data = await response.json();
|
|
63
|
+
* for (const item of data) {
|
|
64
|
+
* yield item;
|
|
65
|
+
* }
|
|
66
|
+
* },
|
|
67
|
+
* metadata: {
|
|
68
|
+
* name: "fetchUsers",
|
|
69
|
+
* description: "Fetches user data from an API endpoint",
|
|
70
|
+
* parameters: [
|
|
71
|
+
* { name: "endpoint", description: "API endpoint URL", type: "string" }
|
|
72
|
+
* ],
|
|
73
|
+
* output: {
|
|
74
|
+
* description: "User objects",
|
|
75
|
+
* type: "object",
|
|
76
|
+
* properties: {
|
|
77
|
+
* id: { description: "User ID", type: "number" },
|
|
78
|
+
* name: { description: "User name", type: "string" }
|
|
79
|
+
* }
|
|
80
|
+
* },
|
|
81
|
+
* examples: ["LOAD JSON FROM fetchUsers('https://api.example.com/users') AS user"]
|
|
82
|
+
* }
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
static registerAsyncProvider(name: string, providerOrOptions: AsyncDataProvider | RegisterAsyncProviderOptions): void;
|
|
87
|
+
/**
|
|
88
|
+
* Unregisters an async data provider function.
|
|
89
|
+
*
|
|
90
|
+
* @param name - The function name to unregister
|
|
91
|
+
*/
|
|
92
|
+
static unregisterAsyncProvider(name: string): void;
|
|
93
|
+
/**
|
|
94
|
+
* Gets an async data provider by name.
|
|
95
|
+
*
|
|
96
|
+
* @param name - The function name (case-insensitive)
|
|
97
|
+
* @returns The async data provider, or undefined if not found
|
|
98
|
+
*/
|
|
99
|
+
static getAsyncProvider(name: string): AsyncDataProvider | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Checks if a function name is registered as an async data provider.
|
|
102
|
+
*
|
|
103
|
+
* @param name - The function name (case-insensitive)
|
|
104
|
+
* @returns True if the function is an async data provider
|
|
105
|
+
*/
|
|
106
|
+
static isAsyncProvider(name: string): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Gets metadata for a specific function.
|
|
109
|
+
*
|
|
110
|
+
* @param name - The function name (case-insensitive)
|
|
111
|
+
* @returns The function metadata, or undefined if not found
|
|
112
|
+
*/
|
|
113
|
+
static getMetadata(name: string): FunctionMetadata | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* Lists all registered functions with their metadata.
|
|
116
|
+
* Includes both built-in and plugin functions.
|
|
117
|
+
*
|
|
118
|
+
* @param options - Optional filter options
|
|
119
|
+
* @returns Array of function metadata
|
|
120
|
+
*/
|
|
121
|
+
static listFunctions(options?: {
|
|
122
|
+
category?: string;
|
|
123
|
+
includeBuiltins?: boolean;
|
|
124
|
+
asyncOnly?: boolean;
|
|
125
|
+
syncOnly?: boolean;
|
|
126
|
+
}): FunctionMetadata[];
|
|
127
|
+
/**
|
|
128
|
+
* Lists all registered function names.
|
|
129
|
+
*
|
|
130
|
+
* @returns Array of function names
|
|
131
|
+
*/
|
|
132
|
+
static listFunctionNames(): string[];
|
|
133
|
+
/**
|
|
134
|
+
* Gets all function metadata as a JSON-serializable object for LLM consumption.
|
|
135
|
+
*
|
|
136
|
+
* @returns Object with functions grouped by category
|
|
137
|
+
*/
|
|
138
|
+
static toJSON(): {
|
|
139
|
+
functions: FunctionMetadata[];
|
|
140
|
+
categories: string[];
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Creates a function instance by name.
|
|
144
|
+
*
|
|
145
|
+
* @param name - The function name (case-insensitive)
|
|
146
|
+
* @returns A Function instance of the appropriate type
|
|
147
|
+
*/
|
|
148
|
+
static create(name: string): Function;
|
|
149
|
+
}
|
|
150
|
+
export default FunctionFactory;
|
|
151
|
+
//# sourceMappingURL=function_factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function_factory.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/function_factory.ts"],"names":[],"mappings":"AAaA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EACH,gBAAgB,EAChB,uBAAuB,EACvB,4BAA4B,EAE/B,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AAEtG;;;;;;;;;;;GAWG;AACH,cAAM,eAAe;IACjB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,OAAO,CAA2C;IAEjE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc,CAA6C;IAE1E;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA4C;IAEnE;;;;;OAKG;WACW,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,eAAe,GAAG,uBAAuB,GAAG,IAAI;IAcvG;;;;OAIG;WACW,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;WACW,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,GAAG,4BAA4B,GAAG,IAAI;IAc5H;;;;OAIG;WACW,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAMzD;;;;;OAKG;WACW,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAI3E;;;;;OAKG;WACW,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIpD;;;;;OAKG;WACW,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAUrE;;;;;;OAMG;WACW,aAAa,CAAC,OAAO,CAAC,EAAE;QAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACtB,GAAG,gBAAgB,EAAE;IAwBtB;;;;OAIG;WACW,iBAAiB,IAAI,MAAM,EAAE;IAO3C;;;;OAIG;WACW,MAAM,IAAI;QAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE;IAM/E;;;;;OAKG;WACW,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ;CAuC/C;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema definition for function arguments and outputs.
|
|
3
|
+
* Compatible with JSON Schema for LLM consumption.
|
|
4
|
+
*/
|
|
5
|
+
export interface ParameterSchema {
|
|
6
|
+
/** The parameter name */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Description of the parameter */
|
|
9
|
+
description: string;
|
|
10
|
+
/** JSON Schema type: string, number, boolean, object, array, null */
|
|
11
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "null" | string;
|
|
12
|
+
/** Whether the parameter is required (default: true) */
|
|
13
|
+
required?: boolean;
|
|
14
|
+
/** Default value if not provided */
|
|
15
|
+
default?: any;
|
|
16
|
+
/** For arrays, the schema of items */
|
|
17
|
+
items?: Omit<ParameterSchema, 'name' | 'required' | 'default'>;
|
|
18
|
+
/** For objects, the properties schema */
|
|
19
|
+
properties?: Record<string, Omit<ParameterSchema, 'name' | 'required'>>;
|
|
20
|
+
/** Enum of allowed values */
|
|
21
|
+
enum?: any[];
|
|
22
|
+
/** Example value */
|
|
23
|
+
example?: any;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Schema definition for function output.
|
|
27
|
+
*/
|
|
28
|
+
export interface OutputSchema {
|
|
29
|
+
/** Description of the output */
|
|
30
|
+
description: string;
|
|
31
|
+
/** JSON Schema type */
|
|
32
|
+
type: "string" | "number" | "boolean" | "object" | "array" | "null" | string;
|
|
33
|
+
/** For arrays, the schema of items */
|
|
34
|
+
items?: Omit<OutputSchema, 'description'>;
|
|
35
|
+
/** For objects, the properties schema */
|
|
36
|
+
properties?: Record<string, Omit<ParameterSchema, 'name' | 'required'>>;
|
|
37
|
+
/** Example output value */
|
|
38
|
+
example?: any;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Metadata for a registered function, designed for LLM consumption.
|
|
42
|
+
*/
|
|
43
|
+
export interface FunctionMetadata {
|
|
44
|
+
/** The function name */
|
|
45
|
+
name: string;
|
|
46
|
+
/** Human-readable description of what the function does */
|
|
47
|
+
description: string;
|
|
48
|
+
/** Category for grouping functions (e.g., "aggregation", "string", "data") */
|
|
49
|
+
category?: string;
|
|
50
|
+
/** Array of parameter schemas */
|
|
51
|
+
parameters: ParameterSchema[];
|
|
52
|
+
/** Output schema */
|
|
53
|
+
output: OutputSchema;
|
|
54
|
+
/** Example usage in FlowQuery syntax */
|
|
55
|
+
examples?: string[];
|
|
56
|
+
/** Whether this is an async data provider for LOAD operations */
|
|
57
|
+
isAsyncProvider?: boolean;
|
|
58
|
+
/** Additional notes or caveats */
|
|
59
|
+
notes?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Options for registering a sync function with metadata.
|
|
63
|
+
*/
|
|
64
|
+
export interface RegisterFunctionOptions {
|
|
65
|
+
/** Factory function that creates the Function instance */
|
|
66
|
+
factory: () => any;
|
|
67
|
+
/** Function metadata for documentation */
|
|
68
|
+
metadata: FunctionMetadata;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Options for registering an async data provider with metadata.
|
|
72
|
+
*/
|
|
73
|
+
export interface RegisterAsyncProviderOptions {
|
|
74
|
+
/** Async generator or function that returns data */
|
|
75
|
+
provider: (...args: any[]) => AsyncGenerator<any, void, unknown> | Promise<any>;
|
|
76
|
+
/** Function metadata for documentation */
|
|
77
|
+
metadata: FunctionMetadata;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Built-in function metadata definitions.
|
|
81
|
+
*/
|
|
82
|
+
export declare const BUILTIN_FUNCTION_METADATA: FunctionMetadata[];
|
|
83
|
+
//# sourceMappingURL=function_metadata.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function_metadata.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/function_metadata.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,qEAAqE;IACrE,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7E,wDAAwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,sCAAsC;IACtC,KAAK,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;IAC/D,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC;IACxE,6BAA6B;IAC7B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,oBAAoB;IACpB,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAC7E,sCAAsC;IACtC,KAAK,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IAC1C,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC;IACxE,2BAA2B;IAC3B,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,WAAW,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,oBAAoB;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,iEAAiE;IACjE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,0DAA0D;IAC1D,OAAO,EAAE,MAAM,GAAG,CAAC;IACnB,0CAA0C;IAC1C,QAAQ,EAAE,gBAAgB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,oDAAoD;IACpD,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,cAAc,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAChF,0CAA0C;IAC1C,QAAQ,EAAE,gBAAgB,CAAC;CAC9B;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAAgB,EAuJvD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Function from "./function";
|
|
2
|
+
/**
|
|
3
|
+
* Built-in function that lists all registered functions with their metadata.
|
|
4
|
+
*
|
|
5
|
+
* Can be used in FlowQuery to discover available functions:
|
|
6
|
+
* - `WITH functions() AS funcs RETURN funcs` - returns all functions
|
|
7
|
+
* - `WITH functions('aggregation') AS funcs RETURN funcs` - returns functions in a category
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```
|
|
11
|
+
* WITH functions() AS funcs
|
|
12
|
+
* UNWIND funcs AS func
|
|
13
|
+
* RETURN func.name, func.description
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare class Functions extends Function {
|
|
17
|
+
constructor();
|
|
18
|
+
value(): any;
|
|
19
|
+
}
|
|
20
|
+
export default Functions;
|
|
21
|
+
//# sourceMappingURL=functions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/functions.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC;;;;;;;;;;;;;GAaG;AACH,cAAM,SAAU,SAAQ,QAAQ;;IAMrB,KAAK,IAAI,GAAG;CAiBtB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/join.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC,cAAM,IAAK,SAAQ,QAAQ;;IAKvB,IAAW,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,EAKrC;IACM,KAAK,IAAI,GAAG;CAQtB;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ASTNode from "../ast_node";
|
|
2
|
+
import Expression from "../expressions/expression";
|
|
3
|
+
import Reference from "../expressions/reference";
|
|
4
|
+
import Where from "../operations/where";
|
|
5
|
+
import ValueHolder from "./value_holder";
|
|
6
|
+
declare class PredicateFunction extends ASTNode {
|
|
7
|
+
private _name;
|
|
8
|
+
protected _valueHolder: ValueHolder;
|
|
9
|
+
constructor(name: string);
|
|
10
|
+
protected get reference(): Reference;
|
|
11
|
+
protected get array(): ASTNode;
|
|
12
|
+
protected get _return(): Expression;
|
|
13
|
+
protected get where(): Where | null;
|
|
14
|
+
value(): any;
|
|
15
|
+
toString(): string;
|
|
16
|
+
}
|
|
17
|
+
export default PredicateFunction;
|
|
18
|
+
//# sourceMappingURL=predicate_function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate_function.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/predicate_function.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,SAAS,MAAM,0BAA0B,CAAC;AACjD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AACxC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,cAAM,iBAAkB,SAAQ,OAAO;IACnC,OAAO,CAAC,KAAK,CAAS;IACtB,SAAS,CAAC,YAAY,EAAE,WAAW,CAAqB;gBAE5C,IAAI,EAAE,MAAM;IAKxB,SAAS,KAAK,SAAS,IAAI,SAAS,CAEnC;IAED,SAAS,KAAK,KAAK,IAAI,OAAO,CAE7B;IAED,SAAS,KAAK,OAAO,IAAI,UAAU,CAElC;IAED,SAAS,KAAK,KAAK,IAAI,KAAK,GAAG,IAAI,CAKlC;IAEM,KAAK,IAAI,GAAG;IAIZ,QAAQ,IAAI,MAAM;CAG5B;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate_function_factory.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/predicate_function_factory.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAGrD,cAAM,wBAAwB;WACZ,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB;CAQxD;AAED,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predicate_sum.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/predicate_sum.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAErD,cAAM,YAAa,SAAQ,iBAAiB;;IAKjC,KAAK,IAAI,GAAG;CAmBtB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rand.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/rand.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAM,IAAK,SAAQ,QAAQ;;IAKhB,KAAK,IAAI,GAAG;CAGtB;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/range.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAM,KAAM,SAAQ,QAAQ;;IAKjB,KAAK,IAAI,GAAG;CAQtB;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer_element.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/reducer_element.ts"],"names":[],"mappings":"AAAA,cAAM,cAAc;IAChB,IAAW,KAAK,IAAI,GAAG,CAEtB;IACD,IAAW,KAAK,CAAC,KAAK,EAAE,GAAG,EAE1B;CACJ;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/replace.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAM,OAAQ,SAAQ,QAAQ;;IAKnB,KAAK,IAAI,GAAG;CAStB;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/round.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAM,KAAM,SAAQ,QAAQ;;IAKjB,KAAK,IAAI,GAAG;CAOtB;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/size.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAM,IAAK,SAAQ,QAAQ;;IAKhB,KAAK,IAAI,GAAG;CAOtB;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/split.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC,cAAM,KAAM,SAAQ,QAAQ;;IAKxB,IAAW,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,EAKrC;IACM,KAAK,IAAI,GAAG;CAQtB;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringify.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/stringify.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAGlC,cAAM,SAAU,SAAQ,QAAQ;;IAK5B,IAAW,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,EAKrC;IACM,KAAK,IAAI,GAAG;CAQtB;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import AggregateFunction from "./aggregate_function";
|
|
2
|
+
import ReducerElement from "./reducer_element";
|
|
3
|
+
declare class SumReducerElement extends ReducerElement {
|
|
4
|
+
private _value;
|
|
5
|
+
get value(): any;
|
|
6
|
+
set value(value: any);
|
|
7
|
+
}
|
|
8
|
+
declare class Sum extends AggregateFunction {
|
|
9
|
+
constructor();
|
|
10
|
+
reduce(element: SumReducerElement): void;
|
|
11
|
+
element(): SumReducerElement;
|
|
12
|
+
}
|
|
13
|
+
export default Sum;
|
|
14
|
+
//# sourceMappingURL=sum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sum.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/sum.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,cAAM,iBAAkB,SAAQ,cAAc;IAC1C,OAAO,CAAC,MAAM,CAAa;IAC3B,IAAW,KAAK,IAAI,GAAG,CAEtB;IACD,IAAW,KAAK,CAAC,KAAK,EAAE,GAAG,EAM1B;CACJ;AAED,cAAM,GAAI,SAAQ,iBAAiB;;IAKxB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAGxC,OAAO,IAAI,iBAAiB;CAGtC;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to_json.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/to_json.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,cAAM,MAAO,SAAQ,QAAQ;;IAKlB,KAAK,IAAI,GAAG;CAOtB;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value_holder.d.ts","sourceRoot":"","sources":["../../../src/parsing/functions/value_holder.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,cAAM,WAAY,SAAQ,OAAO;IAC7B,OAAO,CAAC,OAAO,CAAM;IACrB,IAAW,MAAM,CAAC,KAAK,EAAE,GAAG,EAE3B;IACM,KAAK,IAAI,GAAG;CAGtB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../../src/parsing/logic/case.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAKlC,cAAM,IAAK,SAAQ,OAAO;;IAKf,KAAK,IAAI,GAAG;CAatB;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"else.d.ts","sourceRoot":"","sources":["../../../src/parsing/logic/else.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,cAAM,IAAK,SAAQ,OAAO;;IAIf,KAAK,IAAI,GAAG;CAGtB;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"end.d.ts","sourceRoot":"","sources":["../../../src/parsing/logic/end.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,cAAM,GAAI,SAAQ,OAAO;;CAIxB;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"then.d.ts","sourceRoot":"","sources":["../../../src/parsing/logic/then.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,cAAM,IAAK,SAAQ,OAAO;;IAIf,KAAK,IAAI,GAAG;CAGtB;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"when.d.ts","sourceRoot":"","sources":["../../../src/parsing/logic/when.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,aAAa,CAAC;AAElC,cAAM,IAAK,SAAQ,OAAO;;IAIf,KAAK,IAAI,OAAO;CAG1B;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregated_return.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/aggregated_return.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAI9B,cAAM,gBAAiB,SAAQ,MAAM;IACjC,OAAO,CAAC,SAAS,CAAuD;IAC3D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAGjC,IAAW,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAK1C;CACJ;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregated_with.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/aggregated_with.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,UAAU,CAAC;AAI5B,cAAM,cAAe,SAAQ,IAAI;IAC7B,OAAO,CAAC,SAAS,CAAuD;IAC3D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAGpB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAMvC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import AggregationElement from "../functions/reducer_element";
|
|
2
|
+
import Projection from "./projection";
|
|
3
|
+
import Where from "./where";
|
|
4
|
+
declare class Node {
|
|
5
|
+
private _value;
|
|
6
|
+
private _children;
|
|
7
|
+
private _elements;
|
|
8
|
+
constructor(value?: any);
|
|
9
|
+
get value(): any;
|
|
10
|
+
get children(): Map<string, Node>;
|
|
11
|
+
get elements(): AggregationElement[] | null;
|
|
12
|
+
set elements(elements: AggregationElement[]);
|
|
13
|
+
}
|
|
14
|
+
declare class GroupBy extends Projection {
|
|
15
|
+
private _root;
|
|
16
|
+
private _current;
|
|
17
|
+
private _mappers;
|
|
18
|
+
private _reducers;
|
|
19
|
+
protected _where: Where | null;
|
|
20
|
+
run(): Promise<void>;
|
|
21
|
+
private get root();
|
|
22
|
+
private get current();
|
|
23
|
+
private set current(value);
|
|
24
|
+
private resetTree;
|
|
25
|
+
private map;
|
|
26
|
+
private reduce;
|
|
27
|
+
private get mappers();
|
|
28
|
+
private _generate_mappers;
|
|
29
|
+
private get reducers();
|
|
30
|
+
generate_results(mapperIndex?: number, node?: Node): Generator<Record<string, any>>;
|
|
31
|
+
set where(where: Where);
|
|
32
|
+
get where(): boolean;
|
|
33
|
+
}
|
|
34
|
+
export default GroupBy;
|
|
35
|
+
//# sourceMappingURL=group_by.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group_by.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/group_by.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,cAAM,IAAI;IACN,OAAO,CAAC,MAAM,CAAM;IACpB,OAAO,CAAC,SAAS,CAAgC;IACjD,OAAO,CAAC,SAAS,CAAqC;gBAC1C,KAAK,GAAE,GAAU;IAG7B,IAAW,KAAK,IAAI,GAAG,CAEtB;IACD,IAAW,QAAQ,IAAI,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAEvC;IACD,IAAW,QAAQ,IAAI,kBAAkB,EAAE,GAAG,IAAI,CAEjD;IACD,IAAW,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,EAAE,EAEjD;CACJ;AAED,cAAM,OAAQ,SAAQ,UAAU;IAC5B,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,QAAQ,CAA6B;IAC7C,OAAO,CAAC,SAAS,CAAoC;IACrD,SAAS,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,CAAQ;IACzB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAKjC,OAAO,KAAK,IAAI,GAEf;IACD,OAAO,KAAK,OAAO,GAElB;IACD,OAAO,KAAK,OAAO,QAElB;IACD,OAAO,CAAC,SAAS;IAGjB,OAAO,CAAC,GAAG;IAaX,OAAO,CAAC,MAAM;IASd,OAAO,KAAK,OAAO,GAKlB;IACD,OAAO,CAAE,iBAAiB;IAO1B,OAAO,KAAK,QAAQ,GAOnB;IACO,gBAAgB,CAAC,WAAW,GAAE,MAAU,EAAE,IAAI,GAAE,IAAgB,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAmBzG,IAAW,KAAK,CAAC,KAAK,EAAE,KAAK,EAE5B;IACD,IAAW,KAAK,IAAI,OAAO,CAK1B;CACJ;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limit.d.ts","sourceRoot":"","sources":["../../../src/parsing/operations/limit.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,cAAM,KAAM,SAAQ,SAAS;IACzB,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,KAAK,CAAa;gBACd,KAAK,EAAE,MAAM;IAIZ,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAO1B,KAAK,IAAI,IAAI;CAGvB;AAED,eAAe,KAAK,CAAC"}
|