@devrev/meerkat-core 0.0.77

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.
Files changed (237) hide show
  1. package/README.md +11 -0
  2. package/package.json +30 -0
  3. package/src/ast-builder/ast-builder.d.ts +6 -0
  4. package/src/ast-builder/ast-builder.js +89 -0
  5. package/src/ast-builder/ast-builder.js.map +1 -0
  6. package/src/ast-deserializer/ast-deserializer.d.ts +5 -0
  7. package/src/ast-deserializer/ast-deserializer.js +30 -0
  8. package/src/ast-deserializer/ast-deserializer.js.map +1 -0
  9. package/src/context-params/context-params-ast.d.ts +11 -0
  10. package/src/context-params/context-params-ast.js +55 -0
  11. package/src/context-params/context-params-ast.js.map +1 -0
  12. package/src/cube-filter-transformer/and/and.d.ts +2 -0
  13. package/src/cube-filter-transformer/and/and.js +18 -0
  14. package/src/cube-filter-transformer/and/and.js.map +1 -0
  15. package/src/cube-filter-transformer/base-condition-builder/base-condition-builder.d.ts +154 -0
  16. package/src/cube-filter-transformer/base-condition-builder/base-condition-builder.js +159 -0
  17. package/src/cube-filter-transformer/base-condition-builder/base-condition-builder.js.map +1 -0
  18. package/src/cube-filter-transformer/contains/contains.d.ts +65 -0
  19. package/src/cube-filter-transformer/contains/contains.js +70 -0
  20. package/src/cube-filter-transformer/contains/contains.js.map +1 -0
  21. package/src/cube-filter-transformer/equals/equals-array.d.ts +2 -0
  22. package/src/cube-filter-transformer/equals/equals-array.js +30 -0
  23. package/src/cube-filter-transformer/equals/equals-array.js.map +1 -0
  24. package/src/cube-filter-transformer/equals/equals.d.ts +2 -0
  25. package/src/cube-filter-transformer/equals/equals.js +37 -0
  26. package/src/cube-filter-transformer/equals/equals.js.map +1 -0
  27. package/src/cube-filter-transformer/factory.d.ts +5 -0
  28. package/src/cube-filter-transformer/factory.js +124 -0
  29. package/src/cube-filter-transformer/factory.js.map +1 -0
  30. package/src/cube-filter-transformer/gt/gt.d.ts +2 -0
  31. package/src/cube-filter-transformer/gt/gt.js +30 -0
  32. package/src/cube-filter-transformer/gt/gt.js.map +1 -0
  33. package/src/cube-filter-transformer/gte/gte.d.ts +2 -0
  34. package/src/cube-filter-transformer/gte/gte.js +30 -0
  35. package/src/cube-filter-transformer/gte/gte.js.map +1 -0
  36. package/src/cube-filter-transformer/in/in.d.ts +2 -0
  37. package/src/cube-filter-transformer/in/in.js +77 -0
  38. package/src/cube-filter-transformer/in/in.js.map +1 -0
  39. package/src/cube-filter-transformer/in-date-range/in-date-range.d.ts +2 -0
  40. package/src/cube-filter-transformer/in-date-range/in-date-range.js +24 -0
  41. package/src/cube-filter-transformer/in-date-range/in-date-range.js.map +1 -0
  42. package/src/cube-filter-transformer/lt/lt.d.ts +2 -0
  43. package/src/cube-filter-transformer/lt/lt.js +30 -0
  44. package/src/cube-filter-transformer/lt/lt.js.map +1 -0
  45. package/src/cube-filter-transformer/lte/lte.d.ts +2 -0
  46. package/src/cube-filter-transformer/lte/lte.js +30 -0
  47. package/src/cube-filter-transformer/lte/lte.js.map +1 -0
  48. package/src/cube-filter-transformer/not/not.d.ts +2 -0
  49. package/src/cube-filter-transformer/not/not.js +18 -0
  50. package/src/cube-filter-transformer/not/not.js.map +1 -0
  51. package/src/cube-filter-transformer/not-In-date-range/not-In-date-range.d.ts +2 -0
  52. package/src/cube-filter-transformer/not-In-date-range/not-In-date-range.js +24 -0
  53. package/src/cube-filter-transformer/not-In-date-range/not-In-date-range.js.map +1 -0
  54. package/src/cube-filter-transformer/not-contains/not-contains.d.ts +65 -0
  55. package/src/cube-filter-transformer/not-contains/not-contains.js +70 -0
  56. package/src/cube-filter-transformer/not-contains/not-contains.js.map +1 -0
  57. package/src/cube-filter-transformer/not-equals/not-equals-array.d.ts +2 -0
  58. package/src/cube-filter-transformer/not-equals/not-equals-array.js +26 -0
  59. package/src/cube-filter-transformer/not-equals/not-equals-array.js.map +1 -0
  60. package/src/cube-filter-transformer/not-equals/not-equals.d.ts +8 -0
  61. package/src/cube-filter-transformer/not-equals/not-equals.js +37 -0
  62. package/src/cube-filter-transformer/not-equals/not-equals.js.map +1 -0
  63. package/src/cube-filter-transformer/not-in/not-in.d.ts +2 -0
  64. package/src/cube-filter-transformer/not-in/not-in.js +84 -0
  65. package/src/cube-filter-transformer/not-in/not-in.js.map +1 -0
  66. package/src/cube-filter-transformer/not-set/not-set.d.ts +2 -0
  67. package/src/cube-filter-transformer/not-set/not-set.js +26 -0
  68. package/src/cube-filter-transformer/not-set/not-set.js.map +1 -0
  69. package/src/cube-filter-transformer/or/or.d.ts +2 -0
  70. package/src/cube-filter-transformer/or/or.js +18 -0
  71. package/src/cube-filter-transformer/or/or.js.map +1 -0
  72. package/src/cube-filter-transformer/set/set.d.ts +2 -0
  73. package/src/cube-filter-transformer/set/set.js +26 -0
  74. package/src/cube-filter-transformer/set/set.js.map +1 -0
  75. package/src/cube-group-by-transformer/cube-group-by-transformer.d.ts +8 -0
  76. package/src/cube-group-by-transformer/cube-group-by-transformer.js +25 -0
  77. package/src/cube-group-by-transformer/cube-group-by-transformer.js.map +1 -0
  78. package/src/cube-limit-offset-transformer/cube-limit-offset-transformer.d.ts +31 -0
  79. package/src/cube-limit-offset-transformer/cube-limit-offset-transformer.js +42 -0
  80. package/src/cube-limit-offset-transformer/cube-limit-offset-transformer.js.map +1 -0
  81. package/src/cube-measure-transformer/cube-measure-transformer.d.ts +21 -0
  82. package/src/cube-measure-transformer/cube-measure-transformer.js +126 -0
  83. package/src/cube-measure-transformer/cube-measure-transformer.js.map +1 -0
  84. package/src/cube-order-by-transformer/cube-order-by-transformer.d.ts +21 -0
  85. package/src/cube-order-by-transformer/cube-order-by-transformer.js +39 -0
  86. package/src/cube-order-by-transformer/cube-order-by-transformer.js.map +1 -0
  87. package/src/cube-to-duckdb/cube-filter-to-duckdb.d.ts +16 -0
  88. package/src/cube-to-duckdb/cube-filter-to-duckdb.js +3 -0
  89. package/src/cube-to-duckdb/cube-filter-to-duckdb.js.map +1 -0
  90. package/src/filter-params/filter-params-ast.d.ts +33 -0
  91. package/src/filter-params/filter-params-ast.js +115 -0
  92. package/src/filter-params/filter-params-ast.js.map +1 -0
  93. package/src/get-projection-clause/get-projection-clause.d.ts +27 -0
  94. package/src/get-projection-clause/get-projection-clause.js +135 -0
  95. package/src/get-projection-clause/get-projection-clause.js.map +1 -0
  96. package/src/get-wrapped-base-query-with-projections/get-wrapped-base-query-with-projections.d.ts +8 -0
  97. package/src/get-wrapped-base-query-with-projections/get-wrapped-base-query-with-projections.js +99 -0
  98. package/src/get-wrapped-base-query-with-projections/get-wrapped-base-query-with-projections.js.map +1 -0
  99. package/src/index.d.ts +16 -0
  100. package/src/index.js +55 -0
  101. package/src/index.js.map +1 -0
  102. package/src/joins/joins.d.ts +22 -0
  103. package/src/joins/joins.js +170 -0
  104. package/src/joins/joins.js.map +1 -0
  105. package/src/types/cube-types/index.d.js +6 -0
  106. package/src/types/cube-types/index.d.js.map +1 -0
  107. package/src/types/cube-types/index.d.ts +2 -0
  108. package/src/types/cube-types/index.js +6 -0
  109. package/src/types/cube-types/index.js.map +1 -0
  110. package/src/types/cube-types/query.d.js +5 -0
  111. package/src/types/cube-types/query.d.js.map +1 -0
  112. package/src/types/cube-types/query.d.ts +141 -0
  113. package/src/types/cube-types/query.js +14 -0
  114. package/src/types/cube-types/query.js.map +1 -0
  115. package/src/types/cube-types/table.d.js +3 -0
  116. package/src/types/cube-types/table.d.js.map +1 -0
  117. package/src/types/cube-types/table.d.ts +25 -0
  118. package/src/types/cube-types/table.js +3 -0
  119. package/src/types/cube-types/table.js.map +1 -0
  120. package/src/types/duckdb-serialization-types/index.d.js +11 -0
  121. package/src/types/duckdb-serialization-types/index.d.js.map +1 -0
  122. package/src/types/duckdb-serialization-types/index.d.ts +7 -0
  123. package/src/types/duckdb-serialization-types/index.js +11 -0
  124. package/src/types/duckdb-serialization-types/index.js.map +1 -0
  125. package/src/types/duckdb-serialization-types/serialization/Constraint.d.ts +47 -0
  126. package/src/types/duckdb-serialization-types/serialization/Constraint.js +31 -0
  127. package/src/types/duckdb-serialization-types/serialization/Constraint.js.map +1 -0
  128. package/src/types/duckdb-serialization-types/serialization/CreateInfo.d.ts +95 -0
  129. package/src/types/duckdb-serialization-types/serialization/CreateInfo.js +67 -0
  130. package/src/types/duckdb-serialization-types/serialization/CreateInfo.js.map +1 -0
  131. package/src/types/duckdb-serialization-types/serialization/Expression.d.js +3 -0
  132. package/src/types/duckdb-serialization-types/serialization/Expression.d.js.map +1 -0
  133. package/src/types/duckdb-serialization-types/serialization/Expression.d.ts +186 -0
  134. package/src/types/duckdb-serialization-types/serialization/Expression.js +130 -0
  135. package/src/types/duckdb-serialization-types/serialization/Expression.js.map +1 -0
  136. package/src/types/duckdb-serialization-types/serialization/LogicalOperator.d.ts +231 -0
  137. package/src/types/duckdb-serialization-types/serialization/LogicalOperator.js +47 -0
  138. package/src/types/duckdb-serialization-types/serialization/LogicalOperator.js.map +1 -0
  139. package/src/types/duckdb-serialization-types/serialization/MacroFunction.d.ts +20 -0
  140. package/src/types/duckdb-serialization-types/serialization/MacroFunction.js +15 -0
  141. package/src/types/duckdb-serialization-types/serialization/MacroFunction.js.map +1 -0
  142. package/src/types/duckdb-serialization-types/serialization/Misc.d.js +3 -0
  143. package/src/types/duckdb-serialization-types/serialization/Misc.d.js.map +1 -0
  144. package/src/types/duckdb-serialization-types/serialization/Misc.d.ts +3 -0
  145. package/src/types/duckdb-serialization-types/serialization/Misc.js +3 -0
  146. package/src/types/duckdb-serialization-types/serialization/Misc.js.map +1 -0
  147. package/src/types/duckdb-serialization-types/serialization/Nodes.d.js +10 -0
  148. package/src/types/duckdb-serialization-types/serialization/Nodes.d.js.map +1 -0
  149. package/src/types/duckdb-serialization-types/serialization/Nodes.d.ts +212 -0
  150. package/src/types/duckdb-serialization-types/serialization/Nodes.js +92 -0
  151. package/src/types/duckdb-serialization-types/serialization/Nodes.js.map +1 -0
  152. package/src/types/duckdb-serialization-types/serialization/ParseInfo.d.ts +192 -0
  153. package/src/types/duckdb-serialization-types/serialization/ParseInfo.js +128 -0
  154. package/src/types/duckdb-serialization-types/serialization/ParseInfo.js.map +1 -0
  155. package/src/types/duckdb-serialization-types/serialization/ParsedExpression.d.js +3 -0
  156. package/src/types/duckdb-serialization-types/serialization/ParsedExpression.d.js.map +1 -0
  157. package/src/types/duckdb-serialization-types/serialization/ParsedExpression.d.ts +114 -0
  158. package/src/types/duckdb-serialization-types/serialization/ParsedExpression.js +37 -0
  159. package/src/types/duckdb-serialization-types/serialization/ParsedExpression.js.map +1 -0
  160. package/src/types/duckdb-serialization-types/serialization/QueryNode.d.js +3 -0
  161. package/src/types/duckdb-serialization-types/serialization/QueryNode.d.js.map +1 -0
  162. package/src/types/duckdb-serialization-types/serialization/QueryNode.d.ts +62 -0
  163. package/src/types/duckdb-serialization-types/serialization/QueryNode.js +42 -0
  164. package/src/types/duckdb-serialization-types/serialization/QueryNode.js.map +1 -0
  165. package/src/types/duckdb-serialization-types/serialization/ResultModifier.d.js +3 -0
  166. package/src/types/duckdb-serialization-types/serialization/ResultModifier.d.js.map +1 -0
  167. package/src/types/duckdb-serialization-types/serialization/ResultModifier.d.ts +29 -0
  168. package/src/types/duckdb-serialization-types/serialization/ResultModifier.js +16 -0
  169. package/src/types/duckdb-serialization-types/serialization/ResultModifier.js.map +1 -0
  170. package/src/types/duckdb-serialization-types/serialization/Statement.d.js +3 -0
  171. package/src/types/duckdb-serialization-types/serialization/Statement.d.js.map +1 -0
  172. package/src/types/duckdb-serialization-types/serialization/Statement.d.ts +4 -0
  173. package/src/types/duckdb-serialization-types/serialization/Statement.js +3 -0
  174. package/src/types/duckdb-serialization-types/serialization/Statement.js.map +1 -0
  175. package/src/types/duckdb-serialization-types/serialization/TableFilter.d.js +3 -0
  176. package/src/types/duckdb-serialization-types/serialization/TableFilter.d.js.map +1 -0
  177. package/src/types/duckdb-serialization-types/serialization/TableFilter.d.ts +32 -0
  178. package/src/types/duckdb-serialization-types/serialization/TableFilter.js +17 -0
  179. package/src/types/duckdb-serialization-types/serialization/TableFilter.js.map +1 -0
  180. package/src/types/duckdb-serialization-types/serialization/TableRef.d.js +3 -0
  181. package/src/types/duckdb-serialization-types/serialization/TableRef.d.js.map +1 -0
  182. package/src/types/duckdb-serialization-types/serialization/TableRef.d.ts +84 -0
  183. package/src/types/duckdb-serialization-types/serialization/TableRef.js +53 -0
  184. package/src/types/duckdb-serialization-types/serialization/TableRef.js.map +1 -0
  185. package/src/types/duckdb-serialization-types/serialization/Types.d.js +3 -0
  186. package/src/types/duckdb-serialization-types/serialization/Types.d.js.map +1 -0
  187. package/src/types/duckdb-serialization-types/serialization/Types.d.ts +53 -0
  188. package/src/types/duckdb-serialization-types/serialization/Types.js +21 -0
  189. package/src/types/duckdb-serialization-types/serialization/Types.js.map +1 -0
  190. package/src/types/duckdb-serialization-types/serialization/example.d.ts +1 -0
  191. package/src/types/duckdb-serialization-types/serialization/example.js +131 -0
  192. package/src/types/duckdb-serialization-types/serialization/example.js.map +1 -0
  193. package/src/utils/__fixtures__/joins.fixtures.d.ts +211 -0
  194. package/src/utils/__fixtures__/joins.fixtures.js +922 -0
  195. package/src/utils/__fixtures__/joins.fixtures.js.map +1 -0
  196. package/src/utils/base-ast.d.ts +3 -0
  197. package/src/utils/base-ast.js +64 -0
  198. package/src/utils/base-ast.js.map +1 -0
  199. package/src/utils/constants.d.ts +2 -0
  200. package/src/utils/constants.js +19 -0
  201. package/src/utils/constants.js.map +1 -0
  202. package/src/utils/cube-filter-enrichment.d.ts +4 -0
  203. package/src/utils/cube-filter-enrichment.js +63 -0
  204. package/src/utils/cube-filter-enrichment.js.map +1 -0
  205. package/src/utils/cube-to-table-schema.d.ts +3 -0
  206. package/src/utils/cube-to-table-schema.js +104 -0
  207. package/src/utils/cube-to-table-schema.js.map +1 -0
  208. package/src/utils/cube-type-to-duckdb-type.d.ts +6 -0
  209. package/src/utils/cube-type-to-duckdb-type.js +17 -0
  210. package/src/utils/cube-type-to-duckdb-type.js.map +1 -0
  211. package/src/utils/find-in-table-schema.d.ts +4 -0
  212. package/src/utils/find-in-table-schema.js +40 -0
  213. package/src/utils/find-in-table-schema.js.map +1 -0
  214. package/src/utils/get-possible-nodes.d.ts +15 -0
  215. package/src/utils/get-possible-nodes.js +152 -0
  216. package/src/utils/get-possible-nodes.js.map +1 -0
  217. package/src/utils/get-type-info.d.ts +7 -0
  218. package/src/utils/get-type-info.js +44 -0
  219. package/src/utils/get-type-info.js.map +1 -0
  220. package/src/utils/is-array-member-type.d.ts +4 -0
  221. package/src/utils/is-array-member-type.js +12 -0
  222. package/src/utils/is-array-member-type.js.map +1 -0
  223. package/src/utils/key-from-measures-dimension.d.ts +2 -0
  224. package/src/utils/key-from-measures-dimension.js +34 -0
  225. package/src/utils/key-from-measures-dimension.js.map +1 -0
  226. package/src/utils/meerkat-placeholder-replacer.d.ts +1 -0
  227. package/src/utils/meerkat-placeholder-replacer.js +14 -0
  228. package/src/utils/meerkat-placeholder-replacer.js.map +1 -0
  229. package/src/utils/member-key-to-safe-key.d.ts +1 -0
  230. package/src/utils/member-key-to-safe-key.js +13 -0
  231. package/src/utils/member-key-to-safe-key.js.map +1 -0
  232. package/src/utils/modify-meerkat-filter.d.ts +3 -0
  233. package/src/utils/modify-meerkat-filter.js +30 -0
  234. package/src/utils/modify-meerkat-filter.js.map +1 -0
  235. package/src/utils/type-guards.d.ts +8 -0
  236. package/src/utils/type-guards.js +83 -0
  237. package/src/utils/type-guards.js.map +1 -0
@@ -0,0 +1,114 @@
1
+ import { ExpressionClass, ExpressionType } from './Expression';
2
+ import { CacheCheck, Value } from './Misc';
3
+ import { LogicalType, OrderByNode } from './Nodes';
4
+ import { OrderModifier } from './ResultModifier';
5
+ import { SelectStatement } from './Statement';
6
+ export interface BaseParsedExpression {
7
+ class: ExpressionClass;
8
+ type: ExpressionType;
9
+ alias: string;
10
+ }
11
+ export type ParsedExpression = BetweenExpression | CaseExpression | CastExpression | CollateExpression | ColumnRefExpression | ComparisonExpression | ConjunctionExpression | ConstantExpression | DefaultExpression | FunctionExpression | LambdaExpression | OperatorExpression | ParameterExpression | PositionalReferenceExpression | StarExpression | SubqueryExpression | WindowExpression;
12
+ export interface BetweenExpression extends BaseParsedExpression {
13
+ input: ParsedExpression;
14
+ lower: ParsedExpression;
15
+ upper: ParsedExpression;
16
+ }
17
+ export interface CaseExpression extends BaseParsedExpression {
18
+ case_checks: CacheCheck[];
19
+ else_expr: BaseParsedExpression;
20
+ }
21
+ export interface CastExpression extends BaseParsedExpression {
22
+ child: ParsedExpression;
23
+ cast_type: LogicalType;
24
+ try_cast: boolean;
25
+ }
26
+ export interface CollateExpression extends BaseParsedExpression {
27
+ child: ParsedExpression;
28
+ collation: string;
29
+ }
30
+ export interface ColumnRefExpression extends BaseParsedExpression {
31
+ column_names: string[];
32
+ }
33
+ export interface ComparisonExpression extends BaseParsedExpression {
34
+ left: ParsedExpression;
35
+ right: ParsedExpression;
36
+ }
37
+ export interface ConjunctionExpression extends BaseParsedExpression {
38
+ children: ParsedExpression[];
39
+ }
40
+ export interface ConstantExpression extends BaseParsedExpression {
41
+ value: Value;
42
+ }
43
+ export type DefaultExpression = BaseParsedExpression;
44
+ export interface FunctionExpression extends BaseParsedExpression {
45
+ function_name: string;
46
+ schema: string;
47
+ children: ParsedExpression[];
48
+ filter: ParsedExpression | null;
49
+ order_bys: OrderModifier;
50
+ distinct: boolean;
51
+ is_operator: boolean;
52
+ export_state: boolean;
53
+ catalog: string;
54
+ }
55
+ export interface LambdaExpression extends BaseParsedExpression {
56
+ lhs: ParsedExpression;
57
+ expr: ParsedExpression | null;
58
+ }
59
+ export interface OperatorExpression extends BaseParsedExpression {
60
+ children: ParsedExpression[];
61
+ }
62
+ export interface ParameterExpression extends BaseParsedExpression {
63
+ identifier: string;
64
+ }
65
+ export interface PositionalReferenceExpression extends BaseParsedExpression {
66
+ index: number;
67
+ }
68
+ export interface StarExpression extends BaseParsedExpression {
69
+ relation_name: string;
70
+ exclude_list: Set<string> | Array<string>;
71
+ replace_list: Set<ParsedExpression> | Array<ParsedExpression>;
72
+ columns: boolean;
73
+ expr?: ParsedExpression;
74
+ }
75
+ export declare enum SubqueryType {
76
+ INVALID = "INVALID",
77
+ SCALAR = "SCALAR",
78
+ EXISTS = "EXISTS",
79
+ NOT_EXISTS = "NOT_EXISTS",
80
+ ANY = "ANY"
81
+ }
82
+ export interface SubqueryExpression extends BaseParsedExpression {
83
+ subquery_type: SubqueryType;
84
+ subquery: SelectStatement;
85
+ child?: ParsedExpression;
86
+ comparison_type: ExpressionType;
87
+ }
88
+ export declare enum WindowBoundary {
89
+ INVALID = "INVALID",
90
+ UNBOUNDED_PRECEDING = "UNBOUNDED_PRECEDING",
91
+ UNBOUNDED_FOLLOWING = "UNBOUNDED_FOLLOWING",
92
+ CURRENT_ROW_RANGE = "CURRENT_ROW_RANGE",
93
+ CURRENT_ROW_ROWS = "CURRENT_ROW_ROWS",
94
+ EXPR_PRECEDING_ROWS = "EXPR_PRECEDING_ROWS",
95
+ EXPR_FOLLOWING_ROWS = "EXPR_FOLLOWING_ROWS",
96
+ EXPR_PRECEDING_RANGE = "EXPR_PRECEDING_RANGE",
97
+ EXPR_FOLLOWING_RANGE = "EXPR_FOLLOWING_RANGE"
98
+ }
99
+ export interface WindowExpression extends BaseParsedExpression {
100
+ function_name: string;
101
+ schema: string;
102
+ catalog: string;
103
+ children: ParsedExpression[];
104
+ partitions: ParsedExpression[];
105
+ orders: OrderByNode[];
106
+ start: WindowBoundary;
107
+ end: WindowBoundary;
108
+ start_expr?: ParsedExpression;
109
+ end_expr?: ParsedExpression;
110
+ offset_expr?: ParsedExpression;
111
+ default_expr?: ParsedExpression;
112
+ ignore_nulls: boolean;
113
+ filter_expr?: ParsedExpression;
114
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ function _export(target, all) {
3
+ for(var name in all)Object.defineProperty(target, name, {
4
+ enumerable: true,
5
+ get: all[name]
6
+ });
7
+ }
8
+ _export(exports, {
9
+ SubqueryType: function() {
10
+ return SubqueryType;
11
+ },
12
+ WindowBoundary: function() {
13
+ return WindowBoundary;
14
+ }
15
+ });
16
+ var SubqueryType;
17
+ (function(SubqueryType) {
18
+ SubqueryType["INVALID"] = "INVALID";
19
+ SubqueryType["SCALAR"] = "SCALAR";
20
+ SubqueryType["EXISTS"] = "EXISTS";
21
+ SubqueryType["NOT_EXISTS"] = "NOT_EXISTS";
22
+ SubqueryType["ANY"] = "ANY";
23
+ })(SubqueryType || (SubqueryType = {}));
24
+ var WindowBoundary;
25
+ (function(WindowBoundary) {
26
+ WindowBoundary["INVALID"] = "INVALID";
27
+ WindowBoundary["UNBOUNDED_PRECEDING"] = "UNBOUNDED_PRECEDING";
28
+ WindowBoundary["UNBOUNDED_FOLLOWING"] = "UNBOUNDED_FOLLOWING";
29
+ WindowBoundary["CURRENT_ROW_RANGE"] = "CURRENT_ROW_RANGE";
30
+ WindowBoundary["CURRENT_ROW_ROWS"] = "CURRENT_ROW_ROWS";
31
+ WindowBoundary["EXPR_PRECEDING_ROWS"] = "EXPR_PRECEDING_ROWS";
32
+ WindowBoundary["EXPR_FOLLOWING_ROWS"] = "EXPR_FOLLOWING_ROWS";
33
+ WindowBoundary["EXPR_PRECEDING_RANGE"] = "EXPR_PRECEDING_RANGE";
34
+ WindowBoundary["EXPR_FOLLOWING_RANGE"] = "EXPR_FOLLOWING_RANGE";
35
+ })(WindowBoundary || (WindowBoundary = {}));
36
+
37
+ //# sourceMappingURL=ParsedExpression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/ParsedExpression.ts"],"sourcesContent":["import { ExpressionClass, ExpressionType } from './Expression';\nimport { CacheCheck, Value } from './Misc';\nimport { LogicalType, OrderByNode } from './Nodes';\nimport { OrderModifier } from './ResultModifier';\nimport { SelectStatement } from './Statement';\n\nexport interface BaseParsedExpression {\n class: ExpressionClass;\n type: ExpressionType;\n alias: string;\n}\n\nexport type ParsedExpression =\n | BetweenExpression\n | CaseExpression\n | CastExpression\n | CollateExpression\n | ColumnRefExpression\n | ComparisonExpression\n | ConjunctionExpression\n | ConstantExpression\n | DefaultExpression\n | FunctionExpression\n | LambdaExpression\n | OperatorExpression\n | ParameterExpression\n | PositionalReferenceExpression\n | StarExpression\n | SubqueryExpression\n | WindowExpression;\n\nexport interface BetweenExpression extends BaseParsedExpression {\n input: ParsedExpression;\n lower: ParsedExpression;\n upper: ParsedExpression;\n}\n\nexport interface CaseExpression extends BaseParsedExpression {\n case_checks: CacheCheck[];\n else_expr: BaseParsedExpression;\n}\n\nexport interface CastExpression extends BaseParsedExpression {\n child: ParsedExpression;\n cast_type: LogicalType;\n try_cast: boolean;\n}\n\nexport interface CollateExpression extends BaseParsedExpression {\n child: ParsedExpression;\n collation: string;\n}\n\nexport interface ColumnRefExpression extends BaseParsedExpression {\n column_names: string[];\n}\n\nexport interface ComparisonExpression extends BaseParsedExpression {\n left: ParsedExpression;\n right: ParsedExpression;\n}\n\nexport interface ConjunctionExpression extends BaseParsedExpression {\n children: ParsedExpression[];\n}\n\nexport interface ConstantExpression extends BaseParsedExpression {\n value: Value;\n}\n\nexport type DefaultExpression = BaseParsedExpression;\n\nexport interface FunctionExpression extends BaseParsedExpression {\n function_name: string;\n schema: string;\n children: ParsedExpression[];\n filter: ParsedExpression | null;\n order_bys: OrderModifier;\n distinct: boolean;\n is_operator: boolean;\n export_state: boolean;\n catalog: string;\n}\n\nexport interface LambdaExpression extends BaseParsedExpression {\n lhs: ParsedExpression;\n expr: ParsedExpression | null;\n}\n\nexport interface OperatorExpression extends BaseParsedExpression {\n children: ParsedExpression[];\n}\n\nexport interface ParameterExpression extends BaseParsedExpression {\n identifier: string;\n}\n\nexport interface PositionalReferenceExpression extends BaseParsedExpression {\n index: number;\n}\n\nexport interface StarExpression extends BaseParsedExpression {\n relation_name: string;\n exclude_list: Set<string> | Array<string>;\n replace_list: Set<ParsedExpression> | Array<ParsedExpression>;\n columns: boolean;\n expr?: ParsedExpression;\n}\n\nexport enum SubqueryType {\n INVALID = 'INVALID',\n SCALAR = 'SCALAR',\n EXISTS = 'EXISTS',\n NOT_EXISTS = 'NOT_EXISTS',\n ANY = 'ANY',\n}\n\nexport interface SubqueryExpression extends BaseParsedExpression {\n subquery_type: SubqueryType;\n subquery: SelectStatement;\n child?: ParsedExpression;\n comparison_type: ExpressionType;\n}\n\nexport enum WindowBoundary {\n INVALID = 'INVALID',\n UNBOUNDED_PRECEDING = 'UNBOUNDED_PRECEDING',\n UNBOUNDED_FOLLOWING = 'UNBOUNDED_FOLLOWING',\n CURRENT_ROW_RANGE = 'CURRENT_ROW_RANGE',\n CURRENT_ROW_ROWS = 'CURRENT_ROW_ROWS',\n EXPR_PRECEDING_ROWS = 'EXPR_PRECEDING_ROWS',\n EXPR_FOLLOWING_ROWS = 'EXPR_FOLLOWING_ROWS',\n EXPR_PRECEDING_RANGE = 'EXPR_PRECEDING_RANGE',\n EXPR_FOLLOWING_RANGE = 'EXPR_FOLLOWING_RANGE',\n}\n\nexport interface WindowExpression extends BaseParsedExpression {\n function_name: string;\n schema: string;\n catalog: string;\n children: ParsedExpression[];\n partitions: ParsedExpression[];\n orders: OrderByNode[];\n start: WindowBoundary;\n end: WindowBoundary;\n start_expr?: ParsedExpression;\n end_expr?: ParsedExpression;\n offset_expr?: ParsedExpression;\n default_expr?: ParsedExpression;\n ignore_nulls: boolean;\n filter_expr?: ParsedExpression;\n}\n"],"names":["SubqueryType","INVALID","SCALAR","EXISTS","NOT_EXISTS","ANY","WindowBoundary","UNBOUNDED_PRECEDING","UNBOUNDED_FOLLOWING","CURRENT_ROW_RANGE","CURRENT_ROW_ROWS","EXPR_PRECEDING_ROWS","EXPR_FOLLOWING_ROWS","EXPR_PRECEDING_RANGE","EXPR_FOLLOWING_RANGE"],"mappings":";;;;;;;;;;;;;;;IA6GO;UAAKA,YAAY;IAAZA,aACVC,aAAAA;IADUD,aAEVE,YAAAA;IAFUF,aAGVG,YAAAA;IAHUH,aAIVI,gBAAAA;IAJUJ,aAKVK,SAAAA;GALUL,iBAAAA;IAeL;UAAKM,cAAc;IAAdA,eACVL,aAAAA;IADUK,eAEVC,yBAAAA;IAFUD,eAGVE,yBAAAA;IAHUF,eAIVG,uBAAAA;IAJUH,eAKVI,sBAAAA;IALUJ,eAMVK,yBAAAA;IANUL,eAOVM,yBAAAA;IAPUN,eAQVO,0BAAAA;IARUP,eASVQ,0BAAAA;GATUR,mBAAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ //# sourceMappingURL=QueryNode.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/QueryNode.d.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ import { CommonTableExpressionMap, SampleOptions } from './Nodes';
2
+ import { ParsedExpression } from './ParsedExpression';
3
+ import { ResultModifier } from './ResultModifier';
4
+ import { TableRef } from './TableRef';
5
+ export declare enum QueryNodeType {
6
+ SELECT_NODE = "SELECT_NODE",
7
+ SET_OPERATION_NODE = "SET_OPERATION_NODE",
8
+ BOUND_SUBQUERY_NODE = "BOUND_SUBQUERY_NODE",
9
+ RECURSIVE_CTE_NODE = "RECURSIVE_CTE_NODE",
10
+ CTE_NODE = "CTE_NODE"
11
+ }
12
+ export interface BaseQueryNode {
13
+ type: QueryNodeType;
14
+ modifiers: ResultModifier[];
15
+ cte_map: CommonTableExpressionMap;
16
+ }
17
+ export type QueryNode = SelectNode | SetOperationNode | RecursiveCTENode | CTENode;
18
+ export declare enum AggregateHandling {
19
+ STANDARD_HANDLING = "STANDARD_HANDLING",
20
+ NO_AGGREGATES_ALLOWED = "NO_AGGREGATES_ALLOWED",
21
+ FORCE_AGGREGATES = "FORCE_AGGREGATES"
22
+ }
23
+ export interface SelectNode extends BaseQueryNode {
24
+ type: QueryNodeType.SELECT_NODE;
25
+ select_list: ParsedExpression[];
26
+ from_table?: TableRef;
27
+ where_clause?: ParsedExpression;
28
+ group_expressions: ParsedExpression[];
29
+ group_sets: Set<number> | Array<Array<number>>;
30
+ aggregate_handling: AggregateHandling;
31
+ having: ParsedExpression | null;
32
+ sample: SampleOptions | null;
33
+ qualify: ParsedExpression | null;
34
+ }
35
+ export declare enum SetOperationType {
36
+ NONE = "NONE",
37
+ UNION = "UNION",
38
+ EXCEPT = "EXCEPT",
39
+ INTERSECT = "INTERSECT",
40
+ UNION_BY_NAME = "UNION_BY_NAME"
41
+ }
42
+ export interface SetOperationNode extends BaseQueryNode {
43
+ type: QueryNodeType.SET_OPERATION_NODE;
44
+ setop_type: SetOperationType;
45
+ left: QueryNode;
46
+ right: QueryNode;
47
+ }
48
+ export interface RecursiveCTENode extends BaseQueryNode {
49
+ type: QueryNodeType.RECURSIVE_CTE_NODE;
50
+ cte_name: string;
51
+ union_all: boolean;
52
+ left: QueryNode;
53
+ right: QueryNode;
54
+ aliases: string[];
55
+ }
56
+ export interface CTENode extends BaseQueryNode {
57
+ type: QueryNodeType.CTE_NODE;
58
+ cte_name: string;
59
+ query: QueryNode;
60
+ child: QueryNode;
61
+ aliases: string[];
62
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ function _export(target, all) {
3
+ for(var name in all)Object.defineProperty(target, name, {
4
+ enumerable: true,
5
+ get: all[name]
6
+ });
7
+ }
8
+ _export(exports, {
9
+ QueryNodeType: function() {
10
+ return QueryNodeType;
11
+ },
12
+ AggregateHandling: function() {
13
+ return AggregateHandling;
14
+ },
15
+ SetOperationType: function() {
16
+ return SetOperationType;
17
+ }
18
+ });
19
+ var QueryNodeType;
20
+ (function(QueryNodeType) {
21
+ QueryNodeType["SELECT_NODE"] = "SELECT_NODE";
22
+ QueryNodeType["SET_OPERATION_NODE"] = "SET_OPERATION_NODE";
23
+ QueryNodeType["BOUND_SUBQUERY_NODE"] = "BOUND_SUBQUERY_NODE";
24
+ QueryNodeType["RECURSIVE_CTE_NODE"] = "RECURSIVE_CTE_NODE";
25
+ QueryNodeType["CTE_NODE"] = "CTE_NODE";
26
+ })(QueryNodeType || (QueryNodeType = {}));
27
+ var AggregateHandling;
28
+ (function(AggregateHandling) {
29
+ AggregateHandling["STANDARD_HANDLING"] = "STANDARD_HANDLING";
30
+ AggregateHandling["NO_AGGREGATES_ALLOWED"] = "NO_AGGREGATES_ALLOWED";
31
+ AggregateHandling["FORCE_AGGREGATES"] = "FORCE_AGGREGATES";
32
+ })(AggregateHandling || (AggregateHandling = {}));
33
+ var SetOperationType;
34
+ (function(SetOperationType) {
35
+ SetOperationType["NONE"] = "NONE";
36
+ SetOperationType["UNION"] = "UNION";
37
+ SetOperationType["EXCEPT"] = "EXCEPT";
38
+ SetOperationType["INTERSECT"] = "INTERSECT";
39
+ SetOperationType["UNION_BY_NAME"] = "UNION_BY_NAME";
40
+ })(SetOperationType || (SetOperationType = {}));
41
+
42
+ //# sourceMappingURL=QueryNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/QueryNode.ts"],"sourcesContent":["import { CommonTableExpressionMap, SampleOptions } from './Nodes';\nimport { ParsedExpression } from './ParsedExpression';\nimport { ResultModifier } from './ResultModifier';\nimport { TableRef } from './TableRef';\n\nexport enum QueryNodeType {\n SELECT_NODE = 'SELECT_NODE',\n SET_OPERATION_NODE = 'SET_OPERATION_NODE',\n BOUND_SUBQUERY_NODE = 'BOUND_SUBQUERY_NODE',\n RECURSIVE_CTE_NODE = 'RECURSIVE_CTE_NODE',\n CTE_NODE = 'CTE_NODE',\n}\n\nexport interface BaseQueryNode {\n type: QueryNodeType;\n modifiers: ResultModifier[];\n cte_map: CommonTableExpressionMap;\n}\n\nexport type QueryNode =\n | SelectNode\n | SetOperationNode\n | RecursiveCTENode\n | CTENode;\n\nexport enum AggregateHandling {\n STANDARD_HANDLING = 'STANDARD_HANDLING',\n NO_AGGREGATES_ALLOWED = 'NO_AGGREGATES_ALLOWED',\n FORCE_AGGREGATES = 'FORCE_AGGREGATES',\n}\n\nexport interface SelectNode extends BaseQueryNode {\n type: QueryNodeType.SELECT_NODE;\n select_list: ParsedExpression[];\n from_table?: TableRef;\n where_clause?: ParsedExpression;\n group_expressions: ParsedExpression[];\n group_sets: Set<number> | Array<Array<number>>;\n aggregate_handling: AggregateHandling;\n having: ParsedExpression | null;\n sample: SampleOptions | null;\n qualify: ParsedExpression | null;\n}\n\nexport enum SetOperationType {\n NONE = 'NONE',\n UNION = 'UNION',\n EXCEPT = 'EXCEPT',\n INTERSECT = 'INTERSECT',\n UNION_BY_NAME = 'UNION_BY_NAME',\n}\n\nexport interface SetOperationNode extends BaseQueryNode {\n type: QueryNodeType.SET_OPERATION_NODE;\n setop_type: SetOperationType;\n left: QueryNode;\n right: QueryNode;\n}\n\nexport interface RecursiveCTENode extends BaseQueryNode {\n type: QueryNodeType.RECURSIVE_CTE_NODE;\n cte_name: string;\n union_all: boolean;\n left: QueryNode;\n right: QueryNode;\n aliases: string[];\n}\n\nexport interface CTENode extends BaseQueryNode {\n type: QueryNodeType.CTE_NODE;\n cte_name: string;\n query: QueryNode;\n child: QueryNode;\n aliases: string[];\n}\n"],"names":["QueryNodeType","SELECT_NODE","SET_OPERATION_NODE","BOUND_SUBQUERY_NODE","RECURSIVE_CTE_NODE","CTE_NODE","AggregateHandling","STANDARD_HANDLING","NO_AGGREGATES_ALLOWED","FORCE_AGGREGATES","SetOperationType","NONE","UNION","EXCEPT","INTERSECT","UNION_BY_NAME"],"mappings":";;;;;;;;;;;;;;;;;;IAKO;UAAKA,aAAa;IAAbA,cACVC,iBAAAA;IADUD,cAEVE,wBAAAA;IAFUF,cAGVG,yBAAAA;IAHUH,cAIVI,wBAAAA;IAJUJ,cAKVK,cAAAA;GALUL,kBAAAA;IAoBL;UAAKM,iBAAiB;IAAjBA,kBACVC,uBAAAA;IADUD,kBAEVE,2BAAAA;IAFUF,kBAGVG,sBAAAA;GAHUH,sBAAAA;IAmBL;UAAKI,gBAAgB;IAAhBA,iBACVC,UAAAA;IADUD,iBAEVE,WAAAA;IAFUF,iBAGVG,YAAAA;IAHUH,iBAIVI,eAAAA;IAJUJ,iBAKVK,mBAAAA;GALUL,qBAAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ //# sourceMappingURL=ResultModifier.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/ResultModifier.d.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ import { BoundOrderByNode, OrderByNode } from './Nodes';
2
+ import { ParsedExpression } from './ParsedExpression';
3
+ export declare enum ResultModifierType {
4
+ LIMIT_MODIFIER = "LIMIT_MODIFIER",
5
+ ORDER_MODIFIER = "ORDER_MODIFIER",
6
+ DISTINCT_MODIFIER = "DISTINCT_MODIFIER",
7
+ LIMIT_PERCENT_MODIFIER = "LIMIT_PERCENT_MODIFIER"
8
+ }
9
+ export interface BaseResultModifier {
10
+ type: ResultModifierType;
11
+ }
12
+ export type ResultModifier = LimitModifier | OrderModifier | DistinctModifier | LimitPercentModifier;
13
+ export interface LimitModifier extends BaseResultModifier {
14
+ limit?: ParsedExpression;
15
+ offset?: ParsedExpression;
16
+ }
17
+ export interface DistinctModifier extends BaseResultModifier {
18
+ distinct_on_targets: ParsedExpression[];
19
+ }
20
+ export interface OrderModifier extends BaseResultModifier {
21
+ orders: OrderByNode[];
22
+ }
23
+ export interface LimitPercentModifier extends BaseResultModifier {
24
+ limit?: ParsedExpression;
25
+ offset?: ParsedExpression;
26
+ }
27
+ export interface BoundOrderModifier {
28
+ orders: BoundOrderByNode[];
29
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "ResultModifierType", {
3
+ enumerable: true,
4
+ get: function() {
5
+ return ResultModifierType;
6
+ }
7
+ });
8
+ var ResultModifierType;
9
+ (function(ResultModifierType) {
10
+ ResultModifierType["LIMIT_MODIFIER"] = "LIMIT_MODIFIER";
11
+ ResultModifierType["ORDER_MODIFIER"] = "ORDER_MODIFIER";
12
+ ResultModifierType["DISTINCT_MODIFIER"] = "DISTINCT_MODIFIER";
13
+ ResultModifierType["LIMIT_PERCENT_MODIFIER"] = "LIMIT_PERCENT_MODIFIER";
14
+ })(ResultModifierType || (ResultModifierType = {}));
15
+
16
+ //# sourceMappingURL=ResultModifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/ResultModifier.ts"],"sourcesContent":["import { BoundOrderByNode, OrderByNode } from './Nodes';\nimport { ParsedExpression } from './ParsedExpression';\n\nexport enum ResultModifierType {\n LIMIT_MODIFIER = 'LIMIT_MODIFIER',\n ORDER_MODIFIER = 'ORDER_MODIFIER',\n DISTINCT_MODIFIER = 'DISTINCT_MODIFIER',\n LIMIT_PERCENT_MODIFIER = 'LIMIT_PERCENT_MODIFIER',\n}\n\nexport interface BaseResultModifier {\n type: ResultModifierType;\n}\n\nexport type ResultModifier = LimitModifier | OrderModifier | DistinctModifier | LimitPercentModifier;\n\nexport interface LimitModifier extends BaseResultModifier {\n limit?: ParsedExpression;\n offset?: ParsedExpression;\n}\n\nexport interface DistinctModifier extends BaseResultModifier {\n distinct_on_targets: ParsedExpression[];\n}\n\nexport interface OrderModifier extends BaseResultModifier {\n orders: OrderByNode[];\n}\n\nexport interface LimitPercentModifier extends BaseResultModifier {\n limit?: ParsedExpression;\n offset?: ParsedExpression;\n}\n\nexport interface BoundOrderModifier {\n orders: BoundOrderByNode[];\n}\n"],"names":["ResultModifierType","LIMIT_MODIFIER","ORDER_MODIFIER","DISTINCT_MODIFIER","LIMIT_PERCENT_MODIFIER"],"mappings":";;;;;;;IAGO;UAAKA,kBAAkB;IAAlBA,mBACVC,oBAAAA;IADUD,mBAEVE,oBAAAA;IAFUF,mBAGVG,uBAAAA;IAHUH,mBAIVI,4BAAAA;GAJUJ,uBAAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ //# sourceMappingURL=Statement.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/Statement.d.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { QueryNode } from './QueryNode';
2
+ export interface SelectStatement {
3
+ node: QueryNode;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ //# sourceMappingURL=Statement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/Statement.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ //# sourceMappingURL=TableFilter.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/TableFilter.d.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ import { ExpressionType } from './Expression';
2
+ import { Value } from './Misc';
3
+ export declare enum TableFilterType {
4
+ CONSTANT_COMPARISON = "CONSTANT_COMPARISON",
5
+ IS_NULL = "IS_NULL",
6
+ IS_NOT_NULL = "IS_NOT_NULL",
7
+ CONJUNCTION_OR = "CONJUNCTION_OR",
8
+ CONJUNCTION_AND = "CONJUNCTION_AND"
9
+ }
10
+ export interface BaseTableFilter {
11
+ filter_type: TableFilterType;
12
+ }
13
+ export type TableFilter = ConstantFilter | IsNullFilter | IsNotNullFilter | ConjunctionOrFilter | ConjunctionAndFilter;
14
+ export interface IsNullFilter extends BaseTableFilter {
15
+ filter_type: TableFilterType.IS_NULL;
16
+ }
17
+ export interface IsNotNullFilter extends BaseTableFilter {
18
+ filter_type: TableFilterType.IS_NOT_NULL;
19
+ }
20
+ export interface ConstantFilter extends BaseTableFilter {
21
+ filter_type: TableFilterType.CONSTANT_COMPARISON;
22
+ comparison_type: ExpressionType;
23
+ constant: Value;
24
+ }
25
+ export interface ConjunctionOrFilter extends BaseTableFilter {
26
+ filter_type: TableFilterType.CONJUNCTION_OR;
27
+ child_filters: TableFilter[];
28
+ }
29
+ export interface ConjunctionAndFilter extends BaseTableFilter {
30
+ filter_type: TableFilterType.CONJUNCTION_AND;
31
+ child_filters: TableFilter[];
32
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "TableFilterType", {
3
+ enumerable: true,
4
+ get: function() {
5
+ return TableFilterType;
6
+ }
7
+ });
8
+ var TableFilterType;
9
+ (function(TableFilterType) {
10
+ TableFilterType["CONSTANT_COMPARISON"] = "CONSTANT_COMPARISON";
11
+ TableFilterType["IS_NULL"] = "IS_NULL";
12
+ TableFilterType["IS_NOT_NULL"] = "IS_NOT_NULL";
13
+ TableFilterType["CONJUNCTION_OR"] = "CONJUNCTION_OR";
14
+ TableFilterType["CONJUNCTION_AND"] = "CONJUNCTION_AND";
15
+ })(TableFilterType || (TableFilterType = {}));
16
+
17
+ //# sourceMappingURL=TableFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/TableFilter.ts"],"sourcesContent":["import { ExpressionType } from './Expression';\nimport { Value } from './Misc';\n\nexport enum TableFilterType {\n CONSTANT_COMPARISON = 'CONSTANT_COMPARISON',\n IS_NULL = 'IS_NULL',\n IS_NOT_NULL = 'IS_NOT_NULL',\n CONJUNCTION_OR = 'CONJUNCTION_OR',\n CONJUNCTION_AND = 'CONJUNCTION_AND',\n}\n\nexport interface BaseTableFilter {\n filter_type: TableFilterType;\n}\n\nexport type TableFilter = ConstantFilter | IsNullFilter | IsNotNullFilter | ConjunctionOrFilter | ConjunctionAndFilter;\n\nexport interface IsNullFilter extends BaseTableFilter {\n filter_type: TableFilterType.IS_NULL;\n}\n\nexport interface IsNotNullFilter extends BaseTableFilter {\n filter_type: TableFilterType.IS_NOT_NULL;\n}\n\nexport interface ConstantFilter extends BaseTableFilter {\n filter_type: TableFilterType.CONSTANT_COMPARISON;\n comparison_type: ExpressionType;\n constant: Value;\n}\n\nexport interface ConjunctionOrFilter extends BaseTableFilter {\n filter_type: TableFilterType.CONJUNCTION_OR;\n child_filters: TableFilter[];\n}\n\nexport interface ConjunctionAndFilter extends BaseTableFilter {\n filter_type: TableFilterType.CONJUNCTION_AND;\n child_filters: TableFilter[];\n}\n"],"names":["TableFilterType","CONSTANT_COMPARISON","IS_NULL","IS_NOT_NULL","CONJUNCTION_OR","CONJUNCTION_AND"],"mappings":";;;;;;;IAGO;UAAKA,eAAe;IAAfA,gBACVC,yBAAAA;IADUD,gBAEVE,aAAAA;IAFUF,gBAGVG,iBAAAA;IAHUH,gBAIVI,oBAAAA;IAJUJ,gBAKVK,qBAAAA;GALUL,oBAAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ //# sourceMappingURL=TableRef.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/TableRef.d.ts"],"names":[],"mappings":""}
@@ -0,0 +1,84 @@
1
+ import { LogicalType, PivotColumn, SampleOptions } from './Nodes';
2
+ import { ParsedExpression } from './ParsedExpression';
3
+ import { SelectStatement } from './Statement';
4
+ export declare enum TableReferenceType {
5
+ INVALID = "INVALID",
6
+ BASE_TABLE = "BASE_TABLE",
7
+ SUBQUERY = "SUBQUERY",
8
+ JOIN = "JOIN",
9
+ TABLE_FUNCTION = "TABLE_FUNCTION",
10
+ EXPRESSION_LIST = "EXPRESSION_LIST",
11
+ CTE = "CTE",
12
+ EMPTY = "EMPTY",
13
+ PIVOT = "PIVOT"
14
+ }
15
+ export interface BaseTableRef {
16
+ type: TableReferenceType;
17
+ alias: string;
18
+ sample: SampleOptions | null;
19
+ }
20
+ export type TableRef = BaseTypeTableRef | SubqueryRef | JoinRef | TableFunctionRef | ExpressionListRef | EmptyTableRef | PivotRef;
21
+ export interface BaseTypeTableRef extends BaseTableRef {
22
+ type: TableReferenceType.BASE_TABLE;
23
+ schema_name: string;
24
+ table_name: string;
25
+ column_name_alias: string[];
26
+ catalog_name: string;
27
+ }
28
+ export declare enum JoinType {
29
+ INVALID = "INVALID",
30
+ LEFT = "LEFT",
31
+ RIGHT = "RIGHT",
32
+ INNER = "INNER",
33
+ OUTER = "OUTER",
34
+ SEMI = "SEMI",
35
+ ANTI = "ANTI",
36
+ MARK = "MARK",
37
+ SINGLE = "SINGLE"
38
+ }
39
+ export declare enum JoinRefType {
40
+ REGULAR = "REGULAR",
41
+ NATURAL = "NATURAL",
42
+ CROSS = "CROSS",
43
+ POSITIONAL = "POSITIONAL",
44
+ ASOF = "ASOF",
45
+ DEPENDENT = "DEPENDENT"
46
+ }
47
+ export interface JoinRef extends BaseTableRef {
48
+ type: TableReferenceType.JOIN;
49
+ left: TableRef;
50
+ right: TableRef;
51
+ condition?: ParsedExpression;
52
+ join_type: JoinType;
53
+ ref_type: JoinRefType;
54
+ using_columns: string[];
55
+ }
56
+ export interface SubqueryRef extends BaseTableRef {
57
+ type: TableReferenceType.SUBQUERY;
58
+ subquery: SelectStatement;
59
+ column_name_alias: string[];
60
+ }
61
+ export interface TableFunctionRef extends BaseTableRef {
62
+ type: TableReferenceType.TABLE_FUNCTION;
63
+ function: ParsedExpression;
64
+ column_name_alias: string[];
65
+ }
66
+ export interface EmptyTableRef extends BaseTableRef {
67
+ type: TableReferenceType.EMPTY;
68
+ }
69
+ export interface ExpressionListRef extends BaseTableRef {
70
+ type: TableReferenceType.EXPRESSION_LIST;
71
+ expected_names: string[];
72
+ expected_types: LogicalType[];
73
+ values: ParsedExpression[][];
74
+ }
75
+ export interface PivotRef extends BaseTableRef {
76
+ type: TableReferenceType.PIVOT;
77
+ source: TableRef;
78
+ aggregates: ParsedExpression[];
79
+ unpivot_names: string[];
80
+ pivots: PivotColumn[];
81
+ groups: string[];
82
+ column_name_alias: string[];
83
+ include_nulls: boolean;
84
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ function _export(target, all) {
3
+ for(var name in all)Object.defineProperty(target, name, {
4
+ enumerable: true,
5
+ get: all[name]
6
+ });
7
+ }
8
+ _export(exports, {
9
+ TableReferenceType: function() {
10
+ return TableReferenceType;
11
+ },
12
+ JoinType: function() {
13
+ return JoinType;
14
+ },
15
+ JoinRefType: function() {
16
+ return JoinRefType;
17
+ }
18
+ });
19
+ var TableReferenceType;
20
+ (function(TableReferenceType) {
21
+ TableReferenceType["INVALID"] = "INVALID";
22
+ TableReferenceType["BASE_TABLE"] = "BASE_TABLE";
23
+ TableReferenceType["SUBQUERY"] = "SUBQUERY";
24
+ TableReferenceType["JOIN"] = "JOIN";
25
+ TableReferenceType["TABLE_FUNCTION"] = "TABLE_FUNCTION";
26
+ TableReferenceType["EXPRESSION_LIST"] = "EXPRESSION_LIST";
27
+ TableReferenceType["CTE"] = "CTE";
28
+ TableReferenceType["EMPTY"] = "EMPTY";
29
+ TableReferenceType["PIVOT"] = "PIVOT";
30
+ })(TableReferenceType || (TableReferenceType = {}));
31
+ var JoinType;
32
+ (function(JoinType) {
33
+ JoinType["INVALID"] = "INVALID";
34
+ JoinType["LEFT"] = "LEFT";
35
+ JoinType["RIGHT"] = "RIGHT";
36
+ JoinType["INNER"] = "INNER";
37
+ JoinType["OUTER"] = "OUTER";
38
+ JoinType["SEMI"] = "SEMI";
39
+ JoinType["ANTI"] = "ANTI";
40
+ JoinType["MARK"] = "MARK";
41
+ JoinType["SINGLE"] = "SINGLE";
42
+ })(JoinType || (JoinType = {}));
43
+ var JoinRefType;
44
+ (function(JoinRefType) {
45
+ JoinRefType["REGULAR"] = "REGULAR";
46
+ JoinRefType["NATURAL"] = "NATURAL";
47
+ JoinRefType["CROSS"] = "CROSS";
48
+ JoinRefType["POSITIONAL"] = "POSITIONAL";
49
+ JoinRefType["ASOF"] = "ASOF";
50
+ JoinRefType["DEPENDENT"] = "DEPENDENT";
51
+ })(JoinRefType || (JoinRefType = {}));
52
+
53
+ //# sourceMappingURL=TableRef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/TableRef.ts"],"sourcesContent":["import { LogicalType, PivotColumn, SampleOptions } from './Nodes';\nimport { ParsedExpression } from './ParsedExpression';\nimport { SelectStatement } from './Statement';\n\nexport enum TableReferenceType {\n INVALID = 'INVALID',\n BASE_TABLE = 'BASE_TABLE',\n SUBQUERY = 'SUBQUERY',\n JOIN = 'JOIN',\n TABLE_FUNCTION = 'TABLE_FUNCTION',\n EXPRESSION_LIST = 'EXPRESSION_LIST',\n CTE = 'CTE',\n EMPTY = 'EMPTY',\n PIVOT = 'PIVOT',\n}\n\nexport interface BaseTableRef {\n type: TableReferenceType;\n alias: string;\n sample: SampleOptions | null;\n}\n\nexport type TableRef =\n | BaseTypeTableRef\n | SubqueryRef\n | JoinRef\n | TableFunctionRef\n | ExpressionListRef\n | EmptyTableRef\n | PivotRef;\n\nexport interface BaseTypeTableRef extends BaseTableRef {\n type: TableReferenceType.BASE_TABLE;\n schema_name: string;\n table_name: string;\n column_name_alias: string[];\n catalog_name: string;\n}\n\nexport enum JoinType {\n INVALID = 'INVALID',\n LEFT = 'LEFT',\n RIGHT = 'RIGHT',\n INNER = 'INNER',\n OUTER = 'OUTER',\n SEMI = 'SEMI',\n ANTI = 'ANTI',\n MARK = 'MARK',\n SINGLE = 'SINGLE',\n}\n\nexport enum JoinRefType {\n REGULAR = 'REGULAR',\n NATURAL = 'NATURAL',\n CROSS = 'CROSS',\n POSITIONAL = 'POSITIONAL',\n ASOF = 'ASOF',\n DEPENDENT = 'DEPENDENT',\n}\n\nexport interface JoinRef extends BaseTableRef {\n type: TableReferenceType.JOIN;\n left: TableRef;\n right: TableRef;\n condition?: ParsedExpression;\n join_type: JoinType;\n ref_type: JoinRefType;\n using_columns: string[];\n}\n\nexport interface SubqueryRef extends BaseTableRef {\n type: TableReferenceType.SUBQUERY;\n subquery: SelectStatement;\n column_name_alias: string[];\n}\n\nexport interface TableFunctionRef extends BaseTableRef {\n type: TableReferenceType.TABLE_FUNCTION;\n function: ParsedExpression;\n column_name_alias: string[];\n}\n\nexport interface EmptyTableRef extends BaseTableRef {\n type: TableReferenceType.EMPTY;\n}\n\nexport interface ExpressionListRef extends BaseTableRef {\n type: TableReferenceType.EXPRESSION_LIST;\n expected_names: string[];\n expected_types: LogicalType[];\n values: ParsedExpression[][];\n}\n\nexport interface PivotRef extends BaseTableRef {\n type: TableReferenceType.PIVOT;\n source: TableRef;\n aggregates: ParsedExpression[];\n unpivot_names: string[];\n pivots: PivotColumn[];\n groups: string[];\n column_name_alias: string[];\n include_nulls: boolean;\n}\n"],"names":["TableReferenceType","INVALID","BASE_TABLE","SUBQUERY","JOIN","TABLE_FUNCTION","EXPRESSION_LIST","CTE","EMPTY","PIVOT","JoinType","LEFT","RIGHT","INNER","OUTER","SEMI","ANTI","MARK","SINGLE","JoinRefType","REGULAR","NATURAL","CROSS","POSITIONAL","ASOF","DEPENDENT"],"mappings":";;;;;;;;;;;;;;;;;;IAIO;UAAKA,kBAAkB;IAAlBA,mBACVC,aAAAA;IADUD,mBAEVE,gBAAAA;IAFUF,mBAGVG,cAAAA;IAHUH,mBAIVI,UAAAA;IAJUJ,mBAKVK,oBAAAA;IALUL,mBAMVM,qBAAAA;IANUN,mBAOVO,SAAAA;IAPUP,mBAQVQ,WAAAA;IARUR,mBASVS,WAAAA;GATUT,uBAAAA;IAmCL;UAAKU,QAAQ;IAARA,SACVT,aAAAA;IADUS,SAEVC,UAAAA;IAFUD,SAGVE,WAAAA;IAHUF,SAIVG,WAAAA;IAJUH,SAKVI,WAAAA;IALUJ,SAMVK,UAAAA;IANUL,SAOVM,UAAAA;IAPUN,SAQVO,UAAAA;IARUP,SASVQ,YAAAA;GATUR,aAAAA;IAYL;UAAKS,WAAW;IAAXA,YACVC,aAAAA;IADUD,YAEVE,aAAAA;IAFUF,YAGVG,WAAAA;IAHUH,YAIVI,gBAAAA;IAJUJ,YAKVK,UAAAA;IALUL,YAMVM,eAAAA;GANUN,gBAAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ //# sourceMappingURL=Types.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../meerkat-core/src/types/duckdb-serialization-types/serialization/Types.d.ts"],"names":[],"mappings":""}