@malloydata/malloy 0.0.22-dev230202171033 → 0.0.22-dev230206094309

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 (373) hide show
  1. package/package.json +2 -2
  2. package/dist/connection_utils.d.ts +0 -1
  3. package/dist/connection_utils.js +0 -66
  4. package/dist/dialect/dialect.d.ts +0 -66
  5. package/dist/dialect/dialect.js +0 -85
  6. package/dist/dialect/dialect_map.d.ts +0 -3
  7. package/dist/dialect/dialect_map.js +0 -45
  8. package/dist/dialect/duckdb.d.ts +0 -52
  9. package/dist/dialect/duckdb.js +0 -364
  10. package/dist/dialect/index.d.ts +0 -6
  11. package/dist/dialect/index.js +0 -37
  12. package/dist/dialect/postgres.d.ts +0 -52
  13. package/dist/dialect/postgres.js +0 -330
  14. package/dist/dialect/standardsql.d.ts +0 -49
  15. package/dist/dialect/standardsql.js +0 -381
  16. package/dist/index.d.ts +0 -10
  17. package/dist/index.js +0 -59
  18. package/dist/lang/ast/ast-main.d.ts +0 -118
  19. package/dist/lang/ast/ast-main.js +0 -537
  20. package/dist/lang/ast/ast-utils.d.ts +0 -10
  21. package/dist/lang/ast/ast-utils.js +0 -42
  22. package/dist/lang/ast/elements/define-explore.d.ts +0 -17
  23. package/dist/lang/ast/elements/define-explore.js +0 -79
  24. package/dist/lang/ast/elements/define-query.d.ts +0 -14
  25. package/dist/lang/ast/elements/define-query.js +0 -56
  26. package/dist/lang/ast/elements/mallobj.d.ts +0 -12
  27. package/dist/lang/ast/elements/mallobj.js +0 -53
  28. package/dist/lang/ast/elements/pipeline-desc.d.ts +0 -28
  29. package/dist/lang/ast/elements/pipeline-desc.js +0 -102
  30. package/dist/lang/ast/elements/refined-explore.d.ts +0 -15
  31. package/dist/lang/ast/elements/refined-explore.js +0 -121
  32. package/dist/lang/ast/error-factory.d.ts +0 -9
  33. package/dist/lang/ast/error-factory.js +0 -61
  34. package/dist/lang/ast/executors/index-executor.d.ts +0 -18
  35. package/dist/lang/ast/executors/index-executor.js +0 -96
  36. package/dist/lang/ast/executors/project-executor.d.ts +0 -10
  37. package/dist/lang/ast/executors/project-executor.js +0 -68
  38. package/dist/lang/ast/executors/reduce-executor.d.ts +0 -20
  39. package/dist/lang/ast/executors/reduce-executor.js +0 -149
  40. package/dist/lang/ast/explore-properties/field-list-edit.d.ts +0 -8
  41. package/dist/lang/ast/explore-properties/field-list-edit.js +0 -36
  42. package/dist/lang/ast/explore-properties/primary-key.d.ts +0 -7
  43. package/dist/lang/ast/explore-properties/primary-key.js +0 -35
  44. package/dist/lang/ast/explore-properties/renames.d.ts +0 -11
  45. package/dist/lang/ast/explore-properties/renames.js +0 -43
  46. package/dist/lang/ast/explore-properties/turtles.d.ts +0 -5
  47. package/dist/lang/ast/explore-properties/turtles.js +0 -33
  48. package/dist/lang/ast/expressions/apply.d.ts +0 -8
  49. package/dist/lang/ast/expressions/apply.js +0 -37
  50. package/dist/lang/ast/expressions/binary-boolean.d.ts +0 -12
  51. package/dist/lang/ast/expressions/binary-boolean.js +0 -54
  52. package/dist/lang/ast/expressions/binary-numeric.d.ts +0 -11
  53. package/dist/lang/ast/expressions/binary-numeric.js +0 -42
  54. package/dist/lang/ast/expressions/boolean.d.ts +0 -8
  55. package/dist/lang/ast/expressions/boolean.js +0 -39
  56. package/dist/lang/ast/expressions/constant-sub-expression.d.ts +0 -16
  57. package/dist/lang/ast/expressions/constant-sub-expression.js +0 -98
  58. package/dist/lang/ast/expressions/expr-add-sub.d.ts +0 -4
  59. package/dist/lang/ast/expressions/expr-add-sub.js +0 -34
  60. package/dist/lang/ast/expressions/expr-aggregate-function.d.ts +0 -15
  61. package/dist/lang/ast/expressions/expr-aggregate-function.js +0 -99
  62. package/dist/lang/ast/expressions/expr-alternation-tree.d.ts +0 -11
  63. package/dist/lang/ast/expressions/expr-alternation-tree.js +0 -54
  64. package/dist/lang/ast/expressions/expr-asymmetric.d.ts +0 -10
  65. package/dist/lang/ast/expressions/expr-asymmetric.js +0 -27
  66. package/dist/lang/ast/expressions/expr-avg.d.ts +0 -6
  67. package/dist/lang/ast/expressions/expr-avg.js +0 -34
  68. package/dist/lang/ast/expressions/expr-case.d.ts +0 -11
  69. package/dist/lang/ast/expressions/expr-case.js +0 -84
  70. package/dist/lang/ast/expressions/expr-cast.d.ts +0 -13
  71. package/dist/lang/ast/expressions/expr-cast.js +0 -29
  72. package/dist/lang/ast/expressions/expr-compare.d.ts +0 -10
  73. package/dist/lang/ast/expressions/expr-compare.js +0 -48
  74. package/dist/lang/ast/expressions/expr-count-distinct.d.ts +0 -6
  75. package/dist/lang/ast/expressions/expr-count-distinct.js +0 -35
  76. package/dist/lang/ast/expressions/expr-count.d.ts +0 -11
  77. package/dist/lang/ast/expressions/expr-count.js +0 -57
  78. package/dist/lang/ast/expressions/expr-filter.d.ts +0 -12
  79. package/dist/lang/ast/expressions/expr-filter.js +0 -69
  80. package/dist/lang/ast/expressions/expr-func.d.ts +0 -10
  81. package/dist/lang/ast/expressions/expr-func.js +0 -63
  82. package/dist/lang/ast/expressions/expr-granular-time.d.ts +0 -24
  83. package/dist/lang/ast/expressions/expr-granular-time.js +0 -117
  84. package/dist/lang/ast/expressions/expr-id-reference.d.ts +0 -12
  85. package/dist/lang/ast/expressions/expr-id-reference.js +0 -76
  86. package/dist/lang/ast/expressions/expr-logical-op.d.ts +0 -9
  87. package/dist/lang/ast/expressions/expr-logical-op.js +0 -36
  88. package/dist/lang/ast/expressions/expr-max.d.ts +0 -9
  89. package/dist/lang/ast/expressions/expr-max.js +0 -16
  90. package/dist/lang/ast/expressions/expr-min.d.ts +0 -9
  91. package/dist/lang/ast/expressions/expr-min.js +0 -16
  92. package/dist/lang/ast/expressions/expr-minus.d.ts +0 -9
  93. package/dist/lang/ast/expressions/expr-minus.js +0 -48
  94. package/dist/lang/ast/expressions/expr-mul-div.d.ts +0 -4
  95. package/dist/lang/ast/expressions/expr-mul-div.js +0 -34
  96. package/dist/lang/ast/expressions/expr-not.d.ts +0 -10
  97. package/dist/lang/ast/expressions/expr-not.js +0 -49
  98. package/dist/lang/ast/expressions/expr-now.d.ts +0 -7
  99. package/dist/lang/ast/expressions/expr-now.js +0 -46
  100. package/dist/lang/ast/expressions/expr-null.d.ts +0 -6
  101. package/dist/lang/ast/expressions/expr-null.js +0 -41
  102. package/dist/lang/ast/expressions/expr-number.d.ts +0 -10
  103. package/dist/lang/ast/expressions/expr-number.js +0 -42
  104. package/dist/lang/ast/expressions/expr-parens.d.ts +0 -10
  105. package/dist/lang/ast/expressions/expr-parens.js +0 -42
  106. package/dist/lang/ast/expressions/expr-regex.d.ts +0 -8
  107. package/dist/lang/ast/expressions/expr-regex.js +0 -42
  108. package/dist/lang/ast/expressions/expr-string.d.ts +0 -9
  109. package/dist/lang/ast/expressions/expr-string.js +0 -50
  110. package/dist/lang/ast/expressions/expr-sum.d.ts +0 -6
  111. package/dist/lang/ast/expressions/expr-sum.js +0 -12
  112. package/dist/lang/ast/expressions/expr-time-extract.d.ts +0 -13
  113. package/dist/lang/ast/expressions/expr-time-extract.js +0 -117
  114. package/dist/lang/ast/expressions/expr-time.d.ts +0 -11
  115. package/dist/lang/ast/expressions/expr-time.js +0 -62
  116. package/dist/lang/ast/expressions/expr-ungroup.d.ts +0 -14
  117. package/dist/lang/ast/expressions/expr-ungroup.js +0 -83
  118. package/dist/lang/ast/expressions/for-range.d.ts +0 -19
  119. package/dist/lang/ast/expressions/for-range.js +0 -101
  120. package/dist/lang/ast/expressions/granular-literal.d.ts +0 -20
  121. package/dist/lang/ast/expressions/granular-literal.js +0 -148
  122. package/dist/lang/ast/expressions/partial-compare.d.ts +0 -14
  123. package/dist/lang/ast/expressions/partial-compare.js +0 -50
  124. package/dist/lang/ast/expressions/pick-when.d.ts +0 -19
  125. package/dist/lang/ast/expressions/pick-when.js +0 -156
  126. package/dist/lang/ast/expressions/range.d.ts +0 -12
  127. package/dist/lang/ast/expressions/range.js +0 -80
  128. package/dist/lang/ast/expressions/time-frame.d.ts +0 -7
  129. package/dist/lang/ast/expressions/time-frame.js +0 -40
  130. package/dist/lang/ast/expressions/top-by.d.ts +0 -10
  131. package/dist/lang/ast/expressions/top-by.js +0 -51
  132. package/dist/lang/ast/expressions/unary.d.ts +0 -5
  133. package/dist/lang/ast/expressions/unary.js +0 -34
  134. package/dist/lang/ast/expressions/utils.d.ts +0 -15
  135. package/dist/lang/ast/expressions/utils.js +0 -106
  136. package/dist/lang/ast/expressions/when-clause.d.ts +0 -10
  137. package/dist/lang/ast/expressions/when-clause.js +0 -17
  138. package/dist/lang/ast/fragtype-utils.d.ts +0 -39
  139. package/dist/lang/ast/fragtype-utils.js +0 -100
  140. package/dist/lang/ast/import-elements/import-statement.d.ts +0 -9
  141. package/dist/lang/ast/import-elements/import-statement.js +0 -78
  142. package/dist/lang/ast/index.d.ts +0 -96
  143. package/dist/lang/ast/index.js +0 -135
  144. package/dist/lang/ast/json-elements/json-element.d.ts +0 -6
  145. package/dist/lang/ast/json-elements/json-element.js +0 -41
  146. package/dist/lang/ast/json-elements/json-struct-def.d.ts +0 -10
  147. package/dist/lang/ast/json-elements/json-struct-def.js +0 -48
  148. package/dist/lang/ast/nesting/nest-reference.d.ts +0 -7
  149. package/dist/lang/ast/nesting/nest-reference.js +0 -35
  150. package/dist/lang/ast/parameters/constant-parameter.d.ts +0 -8
  151. package/dist/lang/ast/parameters/constant-parameter.js +0 -54
  152. package/dist/lang/ast/parameters/has-parameter.d.ts +0 -19
  153. package/dist/lang/ast/parameters/has-parameter.js +0 -64
  154. package/dist/lang/ast/query-elements/anonymous-query.d.ts +0 -9
  155. package/dist/lang/ast/query-elements/anonymous-query.js +0 -41
  156. package/dist/lang/ast/query-elements/existing-query.d.ts +0 -11
  157. package/dist/lang/ast/query-elements/existing-query.js +0 -79
  158. package/dist/lang/ast/query-elements/full-query.d.ts +0 -10
  159. package/dist/lang/ast/query-elements/full-query.js +0 -85
  160. package/dist/lang/ast/query-elements/query-head-struct.d.ts +0 -9
  161. package/dist/lang/ast/query-elements/query-head-struct.js +0 -48
  162. package/dist/lang/ast/query-items/field-declaration.d.ts +0 -31
  163. package/dist/lang/ast/query-items/field-declaration.js +0 -137
  164. package/dist/lang/ast/query-items/field-references.d.ts +0 -25
  165. package/dist/lang/ast/query-items/field-references.js +0 -80
  166. package/dist/lang/ast/query-properties/aggregate.d.ts +0 -5
  167. package/dist/lang/ast/query-properties/aggregate.js +0 -39
  168. package/dist/lang/ast/query-properties/declare-fields.d.ts +0 -5
  169. package/dist/lang/ast/query-properties/declare-fields.js +0 -33
  170. package/dist/lang/ast/query-properties/dimmensions.d.ts +0 -5
  171. package/dist/lang/ast/query-properties/dimmensions.js +0 -36
  172. package/dist/lang/ast/query-properties/filters.d.ts +0 -18
  173. package/dist/lang/ast/query-properties/filters.js +0 -89
  174. package/dist/lang/ast/query-properties/group-by.d.ts +0 -5
  175. package/dist/lang/ast/query-properties/group-by.js +0 -39
  176. package/dist/lang/ast/query-properties/indexing.d.ts +0 -10
  177. package/dist/lang/ast/query-properties/indexing.js +0 -39
  178. package/dist/lang/ast/query-properties/joins.d.ts +0 -36
  179. package/dist/lang/ast/query-properties/joins.js +0 -143
  180. package/dist/lang/ast/query-properties/limit.d.ts +0 -6
  181. package/dist/lang/ast/query-properties/limit.js +0 -35
  182. package/dist/lang/ast/query-properties/measures.d.ts +0 -5
  183. package/dist/lang/ast/query-properties/measures.js +0 -36
  184. package/dist/lang/ast/query-properties/nests.d.ts +0 -5
  185. package/dist/lang/ast/query-properties/nests.js +0 -33
  186. package/dist/lang/ast/query-properties/ordering.d.ts +0 -15
  187. package/dist/lang/ast/query-properties/ordering.js +0 -66
  188. package/dist/lang/ast/query-properties/project-statement.d.ts +0 -5
  189. package/dist/lang/ast/query-properties/project-statement.js +0 -33
  190. package/dist/lang/ast/query-properties/qop-desc.d.ts +0 -17
  191. package/dist/lang/ast/query-properties/qop-desc.js +0 -123
  192. package/dist/lang/ast/query-properties/sampling.d.ts +0 -8
  193. package/dist/lang/ast/query-properties/sampling.js +0 -38
  194. package/dist/lang/ast/query-properties/top.d.ts +0 -13
  195. package/dist/lang/ast/query-properties/top.js +0 -60
  196. package/dist/lang/ast/result-spaces/index-field-space.d.ts +0 -10
  197. package/dist/lang/ast/result-spaces/index-field-space.js +0 -57
  198. package/dist/lang/ast/result-spaces/project-field-space.d.ts +0 -6
  199. package/dist/lang/ast/result-spaces/project-field-space.js +0 -51
  200. package/dist/lang/ast/result-spaces/reduce-field-space.d.ts +0 -7
  201. package/dist/lang/ast/result-spaces/reduce-field-space.js +0 -37
  202. package/dist/lang/ast/sources/named-source.d.ts +0 -19
  203. package/dist/lang/ast/sources/named-source.js +0 -147
  204. package/dist/lang/ast/sources/query-source.d.ts +0 -9
  205. package/dist/lang/ast/sources/query-source.js +0 -41
  206. package/dist/lang/ast/sources/sql-source.d.ts +0 -7
  207. package/dist/lang/ast/sources/sql-source.js +0 -54
  208. package/dist/lang/ast/sources/table-source.d.ts +0 -8
  209. package/dist/lang/ast/sources/table-source.js +0 -60
  210. package/dist/lang/ast/space-fields/column-space-field.d.ts +0 -9
  211. package/dist/lang/ast/space-fields/column-space-field.js +0 -40
  212. package/dist/lang/ast/space-fields/join-space-field.d.ts +0 -8
  213. package/dist/lang/ast/space-fields/join-space-field.js +0 -35
  214. package/dist/lang/ast/space-fields/query-field-struct.d.ts +0 -10
  215. package/dist/lang/ast/space-fields/query-field-struct.js +0 -46
  216. package/dist/lang/ast/space-fields/query-space-field.d.ts +0 -11
  217. package/dist/lang/ast/space-fields/query-space-field.js +0 -37
  218. package/dist/lang/ast/space-fields/reference-field.d.ts +0 -11
  219. package/dist/lang/ast/space-fields/reference-field.js +0 -45
  220. package/dist/lang/ast/space-fields/rename-space-field.d.ts +0 -11
  221. package/dist/lang/ast/space-fields/rename-space-field.js +0 -50
  222. package/dist/lang/ast/space-fields/wild-space-field.d.ts +0 -10
  223. package/dist/lang/ast/space-fields/wild-space-field.js +0 -40
  224. package/dist/lang/ast/space-parameters/abstract-parameter.d.ts +0 -10
  225. package/dist/lang/ast/space-parameters/abstract-parameter.js +0 -41
  226. package/dist/lang/ast/space-parameters/defined-parameter.d.ts +0 -9
  227. package/dist/lang/ast/space-parameters/defined-parameter.js +0 -40
  228. package/dist/lang/ast/space-seed.d.ts +0 -17
  229. package/dist/lang/ast/space-seed.js +0 -59
  230. package/dist/lang/ast/sql-elements/sql-statement.d.ts +0 -19
  231. package/dist/lang/ast/sql-elements/sql-statement.js +0 -80
  232. package/dist/lang/ast/sql-elements/sql-string.d.ts +0 -12
  233. package/dist/lang/ast/sql-elements/sql-string.js +0 -60
  234. package/dist/lang/ast/static-space.d.ts +0 -33
  235. package/dist/lang/ast/static-space.js +0 -167
  236. package/dist/lang/ast/struct-utils.d.ts +0 -4
  237. package/dist/lang/ast/struct-utils.js +0 -48
  238. package/dist/lang/ast/time-utils.d.ts +0 -12
  239. package/dist/lang/ast/time-utils.js +0 -140
  240. package/dist/lang/ast/types/comparison.d.ts +0 -11
  241. package/dist/lang/ast/types/comparison.js +0 -41
  242. package/dist/lang/ast/types/compart-types.d.ts +0 -10
  243. package/dist/lang/ast/types/compart-types.js +0 -37
  244. package/dist/lang/ast/types/document-compile-result.d.ts +0 -8
  245. package/dist/lang/ast/types/document-compile-result.js +0 -25
  246. package/dist/lang/ast/types/equality.d.ts +0 -7
  247. package/dist/lang/ast/types/equality.js +0 -37
  248. package/dist/lang/ast/types/executor.d.ts +0 -9
  249. package/dist/lang/ast/types/executor.js +0 -25
  250. package/dist/lang/ast/types/explore-desc.d.ts +0 -5
  251. package/dist/lang/ast/types/explore-desc.js +0 -33
  252. package/dist/lang/ast/types/explore-field.d.ts +0 -5
  253. package/dist/lang/ast/types/explore-field.js +0 -32
  254. package/dist/lang/ast/types/explore-property.d.ts +0 -10
  255. package/dist/lang/ast/types/explore-property.js +0 -43
  256. package/dist/lang/ast/types/expr-result.d.ts +0 -5
  257. package/dist/lang/ast/types/expr-result.js +0 -25
  258. package/dist/lang/ast/types/expr-value.d.ts +0 -3
  259. package/dist/lang/ast/types/expr-value.js +0 -25
  260. package/dist/lang/ast/types/expression-def.d.ts +0 -69
  261. package/dist/lang/ast/types/expression-def.js +0 -346
  262. package/dist/lang/ast/types/expression-value-type.d.ts +0 -2
  263. package/dist/lang/ast/types/expression-value-type.js +0 -25
  264. package/dist/lang/ast/types/field-collection-member.d.ts +0 -5
  265. package/dist/lang/ast/types/field-collection-member.js +0 -34
  266. package/dist/lang/ast/types/field-decl.d.ts +0 -7
  267. package/dist/lang/ast/types/field-decl.js +0 -37
  268. package/dist/lang/ast/types/field-map.d.ts +0 -2
  269. package/dist/lang/ast/types/field-map.js +0 -25
  270. package/dist/lang/ast/types/field-space.d.ts +0 -26
  271. package/dist/lang/ast/types/field-space.js +0 -48
  272. package/dist/lang/ast/types/field-type.d.ts +0 -6
  273. package/dist/lang/ast/types/field-type.js +0 -25
  274. package/dist/lang/ast/types/field-value-type.d.ts +0 -3
  275. package/dist/lang/ast/types/field-value-type.js +0 -25
  276. package/dist/lang/ast/types/frag-type.d.ts +0 -6
  277. package/dist/lang/ast/types/frag-type.js +0 -25
  278. package/dist/lang/ast/types/granular-result.d.ts +0 -7
  279. package/dist/lang/ast/types/granular-result.js +0 -11
  280. package/dist/lang/ast/types/lookup-result.d.ts +0 -10
  281. package/dist/lang/ast/types/lookup-result.js +0 -25
  282. package/dist/lang/ast/types/malloy-element.d.ts +0 -105
  283. package/dist/lang/ast/types/malloy-element.js +0 -398
  284. package/dist/lang/ast/types/model-entry.d.ts +0 -6
  285. package/dist/lang/ast/types/model-entry.js +0 -25
  286. package/dist/lang/ast/types/name-space.d.ts +0 -5
  287. package/dist/lang/ast/types/name-space.js +0 -25
  288. package/dist/lang/ast/types/nested-query.d.ts +0 -3
  289. package/dist/lang/ast/types/nested-query.js +0 -25
  290. package/dist/lang/ast/types/op-desc.d.ts +0 -6
  291. package/dist/lang/ast/types/op-desc.js +0 -25
  292. package/dist/lang/ast/types/query-comp.d.ts +0 -5
  293. package/dist/lang/ast/types/query-comp.js +0 -25
  294. package/dist/lang/ast/types/query-element.d.ts +0 -5
  295. package/dist/lang/ast/types/query-element.js +0 -32
  296. package/dist/lang/ast/types/query-item.d.ts +0 -5
  297. package/dist/lang/ast/types/query-item.js +0 -25
  298. package/dist/lang/ast/types/query-property.d.ts +0 -17
  299. package/dist/lang/ast/types/query-property.js +0 -55
  300. package/dist/lang/ast/types/space-entry.d.ts +0 -5
  301. package/dist/lang/ast/types/space-entry.js +0 -29
  302. package/dist/lang/ast/types/space-field.d.ts +0 -10
  303. package/dist/lang/ast/types/space-field.js +0 -48
  304. package/dist/lang/ast/types/space-param.d.ts +0 -6
  305. package/dist/lang/ast/types/space-param.js +0 -34
  306. package/dist/lang/ast/types/stage-field-type.d.ts +0 -1
  307. package/dist/lang/ast/types/stage-field-type.js +0 -25
  308. package/dist/lang/ast/types/time-result.d.ts +0 -6
  309. package/dist/lang/ast/types/time-result.js +0 -25
  310. package/dist/lang/ast/types/turtle-headed-pipe.d.ts +0 -7
  311. package/dist/lang/ast/types/turtle-headed-pipe.js +0 -37
  312. package/dist/lang/field-utils.d.ts +0 -5
  313. package/dist/lang/field-utils.js +0 -43
  314. package/dist/lang/index.d.ts +0 -9
  315. package/dist/lang/index.js +0 -32
  316. package/dist/lang/lib/Malloy/MalloyLexer.d.ts +0 -165
  317. package/dist/lang/lib/Malloy/MalloyLexer.js +0 -1232
  318. package/dist/lang/lib/Malloy/MalloyParser.d.ts +0 -1947
  319. package/dist/lang/lib/Malloy/MalloyParser.js +0 -11909
  320. package/dist/lang/lib/Malloy/MalloyParserListener.d.ts +0 -2022
  321. package/dist/lang/lib/Malloy/MalloyParserListener.js +0 -4
  322. package/dist/lang/lib/Malloy/MalloyParserVisitor.d.ts +0 -1274
  323. package/dist/lang/lib/Malloy/MalloyParserVisitor.js +0 -4
  324. package/dist/lang/parse-log.d.ts +0 -27
  325. package/dist/lang/parse-log.js +0 -51
  326. package/dist/lang/parse-malloy.d.ts +0 -236
  327. package/dist/lang/parse-malloy.js +0 -746
  328. package/dist/lang/parse-to-ast.d.ts +0 -155
  329. package/dist/lang/parse-to-ast.js +0 -990
  330. package/dist/lang/parse-tree-walkers/document-completion-walker.d.ts +0 -10
  331. package/dist/lang/parse-tree-walkers/document-completion-walker.js +0 -148
  332. package/dist/lang/parse-tree-walkers/document-help-context-walker.d.ts +0 -9
  333. package/dist/lang/parse-tree-walkers/document-help-context-walker.js +0 -107
  334. package/dist/lang/parse-tree-walkers/document-highlight-walker.d.ts +0 -83
  335. package/dist/lang/parse-tree-walkers/document-highlight-walker.js +0 -385
  336. package/dist/lang/parse-tree-walkers/document-symbol-walker.d.ts +0 -11
  337. package/dist/lang/parse-tree-walkers/document-symbol-walker.js +0 -182
  338. package/dist/lang/parse-tree-walkers/explore-query-walker.d.ts +0 -34
  339. package/dist/lang/parse-tree-walkers/explore-query-walker.js +0 -74
  340. package/dist/lang/parse-tree-walkers/find-external-references.d.ts +0 -11
  341. package/dist/lang/parse-tree-walkers/find-external-references.js +0 -61
  342. package/dist/lang/reference-list.d.ts +0 -10
  343. package/dist/lang/reference-list.js +0 -90
  344. package/dist/lang/space-field.d.ts +0 -20
  345. package/dist/lang/space-field.js +0 -128
  346. package/dist/lang/test/document-help-context-walker.spec.d.ts +0 -1
  347. package/dist/lang/test/document-help-context-walker.spec.js +0 -55
  348. package/dist/lang/test/document-symbol-walker.spec.d.ts +0 -1
  349. package/dist/lang/test/document-symbol-walker.spec.js +0 -110
  350. package/dist/lang/test/field-symbols.spec.d.ts +0 -1
  351. package/dist/lang/test/field-symbols.spec.js +0 -184
  352. package/dist/lang/test/parse.spec.d.ts +0 -14
  353. package/dist/lang/test/parse.spec.js +0 -2135
  354. package/dist/lang/test/test-translator.d.ts +0 -40
  355. package/dist/lang/test/test-translator.js +0 -344
  356. package/dist/lang/zone.d.ts +0 -57
  357. package/dist/lang/zone.js +0 -107
  358. package/dist/malloy.d.ts +0 -1146
  359. package/dist/malloy.js +0 -2413
  360. package/dist/model/index.d.ts +0 -2
  361. package/dist/model/index.js +0 -45
  362. package/dist/model/malloy_query.d.ts +0 -351
  363. package/dist/model/malloy_query.js +0 -3174
  364. package/dist/model/malloy_types.d.ts +0 -551
  365. package/dist/model/malloy_types.js +0 -378
  366. package/dist/model/sql_block.d.ts +0 -7
  367. package/dist/model/sql_block.js +0 -56
  368. package/dist/model/utils.d.ts +0 -22
  369. package/dist/model/utils.js +0 -102
  370. package/dist/run_sql_options.d.ts +0 -3
  371. package/dist/run_sql_options.js +0 -25
  372. package/dist/runtime_types.d.ts +0 -105
  373. package/dist/runtime_types.js +0 -25
@@ -1,20 +0,0 @@
1
- import { FilterExpression, PipeSegment, QuerySegment } from "../../../model/malloy_types";
2
- import { FieldSpace } from "../types/field-space";
3
- import { Ordering } from "../query-properties/ordering";
4
- import { Top } from "../query-properties/top";
5
- import { QueryProperty } from "../types/query-property";
6
- import { Executor } from "../types/executor";
7
- import { DynamicSpace, QuerySpace, ResultSpace } from "../ast-main";
8
- export declare class ReduceExecutor implements Executor {
9
- inputFS: QuerySpace;
10
- resultFS: ResultSpace;
11
- filters: FilterExpression[];
12
- order?: Top | Ordering;
13
- limit?: number;
14
- refinedInputFS?: DynamicSpace;
15
- constructor(baseFS: FieldSpace);
16
- getResultSpace(fs: FieldSpace): ResultSpace;
17
- execute(qp: QueryProperty): void;
18
- refineFrom(from: PipeSegment | undefined, to: QuerySegment): void;
19
- finalize(fromSeg: PipeSegment | undefined): PipeSegment;
20
- }
@@ -1,149 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ReduceExecutor = void 0;
26
- const malloy_types_1 = require("../../../model/malloy_types");
27
- const error_factory_1 = require("../error-factory");
28
- const aggregate_1 = require("../query-properties/aggregate");
29
- const declare_fields_1 = require("../query-properties/declare-fields");
30
- const filters_1 = require("../query-properties/filters");
31
- const group_by_1 = require("../query-properties/group-by");
32
- const joins_1 = require("../query-properties/joins");
33
- const limit_1 = require("../query-properties/limit");
34
- const ordering_1 = require("../query-properties/ordering");
35
- const top_1 = require("../query-properties/top");
36
- const reduce_field_space_1 = require("../result-spaces/reduce-field-space");
37
- const nests_1 = require("../query-properties/nests");
38
- const ast_main_1 = require("../ast-main");
39
- class ReduceExecutor {
40
- constructor(baseFS) {
41
- this.filters = [];
42
- this.resultFS = this.getResultSpace(baseFS);
43
- this.inputFS = this.resultFS.exprSpace;
44
- }
45
- getResultSpace(fs) {
46
- return new reduce_field_space_1.ReduceFieldSpace(fs);
47
- }
48
- execute(qp) {
49
- if (qp instanceof group_by_1.GroupBy ||
50
- qp instanceof aggregate_1.Aggregate ||
51
- qp instanceof nests_1.Nests) {
52
- this.resultFS.addQueryItems(...qp.list);
53
- }
54
- else if ((0, ast_main_1.isNestedQuery)(qp)) {
55
- this.resultFS.addQueryItems(qp);
56
- }
57
- else if (qp instanceof filters_1.Filter) {
58
- this.filters.push(...qp.getFilterList(this.inputFS));
59
- }
60
- else if (qp instanceof top_1.Top) {
61
- if (this.limit) {
62
- qp.log("Query operation already limited");
63
- }
64
- else {
65
- this.limit = qp.limit;
66
- }
67
- if (qp.by) {
68
- if (this.order) {
69
- qp.log("Query operation is already sorted");
70
- }
71
- else {
72
- this.order = qp;
73
- }
74
- }
75
- }
76
- else if (qp instanceof limit_1.Limit) {
77
- if (this.limit) {
78
- qp.log("Query operation already limited");
79
- }
80
- else {
81
- this.limit = qp.limit;
82
- }
83
- }
84
- else if (qp instanceof ordering_1.Ordering) {
85
- if (this.order) {
86
- qp.log("Query operation already sorted");
87
- }
88
- else {
89
- this.order = qp;
90
- }
91
- }
92
- else if (qp instanceof joins_1.Joins || qp instanceof declare_fields_1.DeclareFields) {
93
- for (const qel of qp.list) {
94
- this.inputFS.extendSource(qel);
95
- }
96
- }
97
- }
98
- refineFrom(from, to) {
99
- if (from && from.type !== "index") {
100
- if (!this.order) {
101
- if (from.orderBy) {
102
- to.orderBy = from.orderBy;
103
- }
104
- else if (from.by) {
105
- to.by = from.by;
106
- }
107
- }
108
- if (!this.limit && from.limit) {
109
- to.limit = from.limit;
110
- }
111
- }
112
- if (this.limit) {
113
- to.limit = this.limit;
114
- }
115
- if (this.order instanceof top_1.Top) {
116
- const topBy = this.order.getBy(this.inputFS);
117
- if (topBy) {
118
- to.by = topBy;
119
- }
120
- }
121
- if (this.order instanceof ordering_1.Ordering) {
122
- to.orderBy = this.order.getOrderBy(this.inputFS);
123
- }
124
- const oldFilters = (from === null || from === void 0 ? void 0 : from.filterList) || [];
125
- if (this.filters.length > 0 && !oldFilters) {
126
- to.filterList = this.filters;
127
- }
128
- else if (oldFilters) {
129
- to.filterList = [...oldFilters, ...this.filters];
130
- }
131
- }
132
- finalize(fromSeg) {
133
- let from;
134
- if (fromSeg) {
135
- if ((0, malloy_types_1.isReduceSegment)(fromSeg)) {
136
- from = fromSeg;
137
- }
138
- else {
139
- this.inputFS.result.log(`Can't refine reduce with ${fromSeg.type}`);
140
- return error_factory_1.ErrorFactory.reduceSegment;
141
- }
142
- }
143
- const reduceSegment = this.resultFS.getQuerySegment(from);
144
- this.refineFrom(from, reduceSegment);
145
- return reduceSegment;
146
- }
147
- }
148
- exports.ReduceExecutor = ReduceExecutor;
149
- //# sourceMappingURL=reduce-executor.js.map
@@ -1,8 +0,0 @@
1
- import { FieldReferences } from "../query-items/field-references";
2
- import { MalloyElement } from "../types/malloy-element";
3
- export declare class FieldListEdit extends MalloyElement {
4
- readonly edit: "accept" | "except";
5
- readonly refs: FieldReferences;
6
- elementType: string;
7
- constructor(edit: "accept" | "except", refs: FieldReferences);
8
- }
@@ -1,36 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.FieldListEdit = void 0;
26
- const malloy_element_1 = require("../types/malloy-element");
27
- class FieldListEdit extends malloy_element_1.MalloyElement {
28
- constructor(edit, refs) {
29
- super({ refs });
30
- this.edit = edit;
31
- this.refs = refs;
32
- this.elementType = "fieldListEdit";
33
- }
34
- }
35
- exports.FieldListEdit = FieldListEdit;
36
- //# sourceMappingURL=field-list-edit.js.map
@@ -1,7 +0,0 @@
1
- import { FieldName } from "../types/field-space";
2
- import { MalloyElement } from "../types/malloy-element";
3
- export declare class PrimaryKey extends MalloyElement {
4
- readonly field: FieldName;
5
- elementType: string;
6
- constructor(field: FieldName);
7
- }
@@ -1,35 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.PrimaryKey = void 0;
26
- const malloy_element_1 = require("../types/malloy-element");
27
- class PrimaryKey extends malloy_element_1.MalloyElement {
28
- constructor(field) {
29
- super({ field });
30
- this.field = field;
31
- this.elementType = "primary key";
32
- }
33
- }
34
- exports.PrimaryKey = PrimaryKey;
35
- //# sourceMappingURL=primary-key.js.map
@@ -1,11 +0,0 @@
1
- import { FieldName } from "../types/field-space";
2
- import { ListOf, MalloyElement } from "../types/malloy-element";
3
- export declare class RenameField extends MalloyElement {
4
- readonly newName: string;
5
- readonly oldName: FieldName;
6
- elementType: string;
7
- constructor(newName: string, oldName: FieldName);
8
- }
9
- export declare class Renames extends ListOf<RenameField> {
10
- constructor(renames: RenameField[]);
11
- }
@@ -1,43 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Renames = exports.RenameField = void 0;
26
- const malloy_element_1 = require("../types/malloy-element");
27
- class RenameField extends malloy_element_1.MalloyElement {
28
- constructor(newName, oldName) {
29
- super();
30
- this.newName = newName;
31
- this.oldName = oldName;
32
- this.elementType = "renameField";
33
- this.has({ oldName });
34
- }
35
- }
36
- exports.RenameField = RenameField;
37
- class Renames extends malloy_element_1.ListOf {
38
- constructor(renames) {
39
- super("renameField", renames);
40
- }
41
- }
42
- exports.Renames = Renames;
43
- //# sourceMappingURL=renames.js.map
@@ -1,5 +0,0 @@
1
- import { TurtleDecl } from "../ast-main";
2
- import { ListOf } from "../types/malloy-element";
3
- export declare class Turtles extends ListOf<TurtleDecl> {
4
- constructor(turtles: TurtleDecl[]);
5
- }
@@ -1,33 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Turtles = void 0;
26
- const malloy_element_1 = require("../types/malloy-element");
27
- class Turtles extends malloy_element_1.ListOf {
28
- constructor(turtles) {
29
- super("turtleDeclarationList", turtles);
30
- }
31
- }
32
- exports.Turtles = Turtles;
33
- //# sourceMappingURL=turtles.js.map
@@ -1,8 +0,0 @@
1
- import { ExprCompare } from "./expr-compare";
2
- import { ExpressionDef } from "../types/expression-def";
3
- export declare class Apply extends ExprCompare {
4
- readonly left: ExpressionDef;
5
- readonly right: ExpressionDef;
6
- elementType: string;
7
- constructor(left: ExpressionDef, right: ExpressionDef);
8
- }
@@ -1,37 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Apply = void 0;
26
- const comparison_1 = require("../types/comparison");
27
- const expr_compare_1 = require("./expr-compare");
28
- class Apply extends expr_compare_1.ExprCompare {
29
- constructor(left, right) {
30
- super(left, comparison_1.Comparison.EqualTo, right);
31
- this.left = left;
32
- this.right = right;
33
- this.elementType = "apply";
34
- }
35
- }
36
- exports.Apply = Apply;
37
- //# sourceMappingURL=apply.js.map
@@ -1,12 +0,0 @@
1
- import { FieldSpace } from "../types/field-space";
2
- import { ExprValue } from "../types/expr-value";
3
- import { ExpressionDef } from "../types/expression-def";
4
- export declare abstract class BinaryBoolean<opType extends string> extends ExpressionDef {
5
- readonly left: ExpressionDef;
6
- readonly op: opType;
7
- readonly right: ExpressionDef;
8
- elementType: string;
9
- legalChildTypes: import("../types/frag-type").FragType[];
10
- constructor(left: ExpressionDef, op: opType, right: ExpressionDef);
11
- getExpression(fs: FieldSpace): ExprValue;
12
- }
@@ -1,54 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.BinaryBoolean = void 0;
26
- const malloy_types_1 = require("../../../model/malloy_types");
27
- const ast_utils_1 = require("../ast-utils");
28
- const fragtype_utils_1 = require("../fragtype-utils");
29
- const expression_def_1 = require("../types/expression-def");
30
- const utils_1 = require("./utils");
31
- class BinaryBoolean extends expression_def_1.ExpressionDef {
32
- constructor(left, op, right) {
33
- super({ left, right });
34
- this.left = left;
35
- this.op = op;
36
- this.right = right;
37
- this.elementType = "abstract boolean binary";
38
- this.legalChildTypes = [fragtype_utils_1.FT.boolT];
39
- }
40
- getExpression(fs) {
41
- const left = this.left.getExpression(fs);
42
- const right = this.right.getExpression(fs);
43
- if (this.typeCheck(this.left, left) && this.typeCheck(this.right, right)) {
44
- return {
45
- dataType: "boolean",
46
- expressionType: (0, malloy_types_1.maxExpressionType)(left.expressionType, right.expressionType),
47
- value: (0, utils_1.compose)(left.value, this.op, right.value),
48
- };
49
- }
50
- return (0, ast_utils_1.errorFor)("logial required boolean");
51
- }
52
- }
53
- exports.BinaryBoolean = BinaryBoolean;
54
- //# sourceMappingURL=binary-boolean.js.map
@@ -1,11 +0,0 @@
1
- import { ExprValue } from "../types/expr-value";
2
- import { FieldSpace } from "../types/field-space";
3
- import { ExpressionDef } from "../types/expression-def";
4
- export declare abstract class BinaryNumeric<opType extends string> extends ExpressionDef {
5
- readonly left: ExpressionDef;
6
- readonly op: opType;
7
- readonly right: ExpressionDef;
8
- elementType: string;
9
- constructor(left: ExpressionDef, op: opType, right: ExpressionDef);
10
- getExpression(fs: FieldSpace): ExprValue;
11
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.BinaryNumeric = void 0;
26
- const fragtype_utils_1 = require("../fragtype-utils");
27
- const expression_def_1 = require("../types/expression-def");
28
- class BinaryNumeric extends expression_def_1.ExpressionDef {
29
- constructor(left, op, right) {
30
- super({ left, right });
31
- this.left = left;
32
- this.op = op;
33
- this.right = right;
34
- this.elementType = "numeric binary abstract";
35
- this.legalChildTypes = [fragtype_utils_1.FT.numberT];
36
- }
37
- getExpression(fs) {
38
- return this.right.apply(fs, this.op, this.left);
39
- }
40
- }
41
- exports.BinaryNumeric = BinaryNumeric;
42
- //# sourceMappingURL=binary-numeric.js.map
@@ -1,8 +0,0 @@
1
- import { ExprValue } from "../types/expr-value";
2
- import { ExpressionDef } from "../types/expression-def";
3
- export declare class Boolean extends ExpressionDef {
4
- readonly value: "true" | "false";
5
- elementType: string;
6
- constructor(value: "true" | "false");
7
- getExpression(): ExprValue;
8
- }
@@ -1,39 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright 2023 Google LLC
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining
6
- * a copy of this software and associated documentation files
7
- * (the "Software"), to deal in the Software without restriction,
8
- * including without limitation the rights to use, copy, modify, merge,
9
- * publish, distribute, sublicense, and/or sell copies of the Software,
10
- * and to permit persons to whom the Software is furnished to do so,
11
- * subject to the following conditions:
12
- *
13
- * The above copyright notice and this permission notice shall be
14
- * included in all copies or substantial portions of the Software.
15
- *
16
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
- */
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Boolean = void 0;
26
- const expression_def_1 = require("../types/expression-def");
27
- const fragtype_utils_1 = require("../fragtype-utils");
28
- class Boolean extends expression_def_1.ExpressionDef {
29
- constructor(value) {
30
- super();
31
- this.value = value;
32
- this.elementType = "boolean literal";
33
- }
34
- getExpression() {
35
- return { ...fragtype_utils_1.FT.boolT, value: [this.value] };
36
- }
37
- }
38
- exports.Boolean = Boolean;
39
- //# sourceMappingURL=boolean.js.map
@@ -1,16 +0,0 @@
1
- import { AtomicFieldType } from "../../../model/malloy_types";
2
- import { ExprValue } from "../types/expr-value";
3
- import { ExpressionDef } from "../types/expression-def";
4
- import { FieldSpace } from "../types/field-space";
5
- export declare class ConstantSubExpression extends ExpressionDef {
6
- readonly expr: ExpressionDef;
7
- elementType: string;
8
- private cfs?;
9
- constructor(expr: ExpressionDef);
10
- getExpression(_fs: FieldSpace): ExprValue;
11
- private get constantFs();
12
- constantValue(): ExprValue;
13
- constantCondition(type: AtomicFieldType): ExprValue;
14
- apply(fs: FieldSpace, op: string, expr: ExpressionDef): ExprValue;
15
- requestExpression(fs: FieldSpace): ExprValue | undefined;
16
- }