@malloydata/malloy 0.0.182-dev240911142514 → 0.0.182-dev240911163224

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 (275) hide show
  1. package/dist/dialect/dialect.d.ts +3 -1
  2. package/dist/dialect/dialect_map.d.ts +1 -2
  3. package/dist/dialect/dialect_map.js +5 -74
  4. package/dist/dialect/duckdb/dialect_functions.d.ts +2 -0
  5. package/dist/dialect/duckdb/dialect_functions.js +67 -0
  6. package/dist/dialect/duckdb/duckdb.d.ts +3 -1
  7. package/dist/dialect/duckdb/duckdb.js +6 -5
  8. package/dist/dialect/duckdb/function_overrides.d.ts +2 -0
  9. package/dist/dialect/duckdb/function_overrides.js +55 -0
  10. package/dist/dialect/functions/index.d.ts +3 -1
  11. package/dist/dialect/functions/index.js +6 -3
  12. package/dist/dialect/functions/malloy_standard_functions.d.ts +134 -0
  13. package/dist/dialect/functions/malloy_standard_functions.js +612 -0
  14. package/dist/dialect/functions/util.d.ts +78 -2
  15. package/dist/dialect/functions/util.js +257 -3
  16. package/dist/dialect/index.d.ts +5 -4
  17. package/dist/dialect/index.js +3 -4
  18. package/dist/dialect/postgres/dialect_functions.d.ts +2 -0
  19. package/dist/dialect/postgres/dialect_functions.js +51 -0
  20. package/dist/dialect/postgres/function_overrides.d.ts +2 -0
  21. package/dist/dialect/postgres/function_overrides.js +73 -0
  22. package/dist/dialect/postgres/postgres.d.ts +3 -2
  23. package/dist/dialect/postgres/postgres.js +6 -6
  24. package/dist/dialect/snowflake/dialect_functions.d.ts +2 -0
  25. package/dist/dialect/snowflake/dialect_functions.js +57 -0
  26. package/dist/dialect/snowflake/function_overrides.d.ts +2 -0
  27. package/dist/dialect/snowflake/function_overrides.js +39 -0
  28. package/dist/dialect/snowflake/snowflake.d.ts +3 -2
  29. package/dist/dialect/snowflake/snowflake.js +6 -6
  30. package/dist/dialect/standardsql/dialect_functions.d.ts +2 -0
  31. package/dist/dialect/standardsql/dialect_functions.js +65 -0
  32. package/dist/dialect/standardsql/function_overrides.d.ts +2 -0
  33. package/dist/dialect/standardsql/function_overrides.js +17 -0
  34. package/dist/dialect/standardsql/standardsql.d.ts +3 -1
  35. package/dist/dialect/standardsql/standardsql.js +6 -5
  36. package/dist/dialect/trino/dialect_functions.d.ts +2 -0
  37. package/dist/dialect/trino/dialect_functions.js +63 -0
  38. package/dist/dialect/trino/function_overrides.d.ts +2 -0
  39. package/dist/dialect/trino/function_overrides.js +50 -0
  40. package/dist/dialect/trino/trino.d.ts +3 -1
  41. package/dist/dialect/trino/trino.js +6 -6
  42. package/dist/index.d.ts +2 -2
  43. package/dist/index.js +3 -4
  44. package/dist/lang/ast/expressions/expr-func.js +25 -29
  45. package/dist/lang/ast/types/dialect-name-space.js +5 -5
  46. package/dist/lang/ast/types/global-name-space.d.ts +4 -2
  47. package/dist/lang/ast/types/global-name-space.js +59 -6
  48. package/dist/model/malloy_query.d.ts +1 -1
  49. package/dist/model/malloy_query.js +7 -6
  50. package/dist/model/malloy_types.d.ts +7 -7
  51. package/package.json +1 -1
  52. package/dist/dialect/duckdb/functions/byte_length.d.ts +0 -2
  53. package/dist/dialect/duckdb/functions/byte_length.js +0 -33
  54. package/dist/dialect/duckdb/functions/count_approx.d.ts +0 -2
  55. package/dist/dialect/duckdb/functions/count_approx.js +0 -20
  56. package/dist/dialect/duckdb/functions/dialect_functions.d.ts +0 -4
  57. package/dist/dialect/duckdb/functions/dialect_functions.js +0 -16
  58. package/dist/dialect/duckdb/functions/div.d.ts +0 -2
  59. package/dist/dialect/duckdb/functions/div.js +0 -38
  60. package/dist/dialect/duckdb/functions/duckdb_functions.d.ts +0 -1
  61. package/dist/dialect/duckdb/functions/duckdb_functions.js +0 -54
  62. package/dist/dialect/duckdb/functions/ends_with.d.ts +0 -2
  63. package/dist/dialect/duckdb/functions/ends_with.js +0 -35
  64. package/dist/dialect/duckdb/functions/greatest_and_least.d.ts +0 -3
  65. package/dist/dialect/duckdb/functions/greatest_and_least.js +0 -51
  66. package/dist/dialect/duckdb/functions/index.d.ts +0 -1
  67. package/dist/dialect/duckdb/functions/index.js +0 -28
  68. package/dist/dialect/duckdb/functions/is_inf.d.ts +0 -2
  69. package/dist/dialect/duckdb/functions/is_inf.js +0 -33
  70. package/dist/dialect/duckdb/functions/is_nan.d.ts +0 -2
  71. package/dist/dialect/duckdb/functions/is_nan.js +0 -33
  72. package/dist/dialect/duckdb/functions/log.d.ts +0 -2
  73. package/dist/dialect/duckdb/functions/log.js +0 -38
  74. package/dist/dialect/duckdb/functions/rand.d.ts +0 -2
  75. package/dist/dialect/duckdb/functions/rand.js +0 -31
  76. package/dist/dialect/duckdb/functions/replace.d.ts +0 -2
  77. package/dist/dialect/duckdb/functions/replace.js +0 -40
  78. package/dist/dialect/duckdb/functions/trunc.d.ts +0 -2
  79. package/dist/dialect/duckdb/functions/trunc.js +0 -39
  80. package/dist/dialect/duckdb/functions/unicode.d.ts +0 -2
  81. package/dist/dialect/duckdb/functions/unicode.js +0 -35
  82. package/dist/dialect/functions/all_functions.d.ts +0 -8
  83. package/dist/dialect/functions/all_functions.js +0 -146
  84. package/dist/dialect/functions/atan2.d.ts +0 -2
  85. package/dist/dialect/functions/atan2.js +0 -33
  86. package/dist/dialect/functions/avg_moving.d.ts +0 -2
  87. package/dist/dialect/functions/avg_moving.js +0 -46
  88. package/dist/dialect/functions/chr.d.ts +0 -4
  89. package/dist/dialect/functions/chr.js +0 -45
  90. package/dist/dialect/functions/coalesce.d.ts +0 -2
  91. package/dist/dialect/functions/coalesce.js +0 -38
  92. package/dist/dialect/functions/concat.d.ts +0 -2
  93. package/dist/dialect/functions/concat.js +0 -38
  94. package/dist/dialect/functions/div.d.ts +0 -2
  95. package/dist/dialect/functions/div.js +0 -36
  96. package/dist/dialect/functions/first_value_window.d.ts +0 -3
  97. package/dist/dialect/functions/first_value_window.js +0 -49
  98. package/dist/dialect/functions/function_map.d.ts +0 -16
  99. package/dist/dialect/functions/function_map.js +0 -72
  100. package/dist/dialect/functions/greatest_and_least.d.ts +0 -3
  101. package/dist/dialect/functions/greatest_and_least.js +0 -44
  102. package/dist/dialect/functions/ifnull.d.ts +0 -2
  103. package/dist/dialect/functions/ifnull.js +0 -38
  104. package/dist/dialect/functions/is_inf.d.ts +0 -2
  105. package/dist/dialect/functions/is_inf.js +0 -33
  106. package/dist/dialect/functions/is_nan.d.ts +0 -2
  107. package/dist/dialect/functions/is_nan.js +0 -33
  108. package/dist/dialect/functions/lag.d.ts +0 -2
  109. package/dist/dialect/functions/lag.js +0 -53
  110. package/dist/dialect/functions/lead.d.ts +0 -2
  111. package/dist/dialect/functions/lead.js +0 -50
  112. package/dist/dialect/functions/length.d.ts +0 -3
  113. package/dist/dialect/functions/length.js +0 -40
  114. package/dist/dialect/functions/log.d.ts +0 -2
  115. package/dist/dialect/functions/log.js +0 -35
  116. package/dist/dialect/functions/lower.d.ts +0 -2
  117. package/dist/dialect/functions/lower.js +0 -34
  118. package/dist/dialect/functions/nullif.d.ts +0 -2
  119. package/dist/dialect/functions/nullif.js +0 -42
  120. package/dist/dialect/functions/pi.d.ts +0 -2
  121. package/dist/dialect/functions/pi.js +0 -31
  122. package/dist/dialect/functions/pow.d.ts +0 -2
  123. package/dist/dialect/functions/pow.js +0 -35
  124. package/dist/dialect/functions/rand.d.ts +0 -2
  125. package/dist/dialect/functions/rand.js +0 -31
  126. package/dist/dialect/functions/rank.d.ts +0 -2
  127. package/dist/dialect/functions/rank.js +0 -36
  128. package/dist/dialect/functions/regexp_extract.d.ts +0 -2
  129. package/dist/dialect/functions/regexp_extract.js +0 -41
  130. package/dist/dialect/functions/repeat.d.ts +0 -2
  131. package/dist/dialect/functions/repeat.js +0 -35
  132. package/dist/dialect/functions/replace.d.ts +0 -2
  133. package/dist/dialect/functions/replace.js +0 -42
  134. package/dist/dialect/functions/reverse.d.ts +0 -2
  135. package/dist/dialect/functions/reverse.js +0 -34
  136. package/dist/dialect/functions/round.d.ts +0 -2
  137. package/dist/dialect/functions/round.js +0 -40
  138. package/dist/dialect/functions/row_number.d.ts +0 -2
  139. package/dist/dialect/functions/row_number.js +0 -40
  140. package/dist/dialect/functions/simple_numeric_functions.d.ts +0 -15
  141. package/dist/dialect/functions/simple_numeric_functions.js +0 -60
  142. package/dist/dialect/functions/sql.d.ts +0 -6
  143. package/dist/dialect/functions/sql.js +0 -52
  144. package/dist/dialect/functions/starts_ends_with.d.ts +0 -3
  145. package/dist/dialect/functions/starts_ends_with.js +0 -43
  146. package/dist/dialect/functions/stddev.d.ts +0 -2
  147. package/dist/dialect/functions/stddev.js +0 -34
  148. package/dist/dialect/functions/string_agg.d.ts +0 -3
  149. package/dist/dialect/functions/string_agg.js +0 -55
  150. package/dist/dialect/functions/strpos.d.ts +0 -2
  151. package/dist/dialect/functions/strpos.js +0 -35
  152. package/dist/dialect/functions/substr.d.ts +0 -2
  153. package/dist/dialect/functions/substr.js +0 -37
  154. package/dist/dialect/functions/sum_min_max_window.d.ts +0 -7
  155. package/dist/dialect/functions/sum_min_max_window.js +0 -94
  156. package/dist/dialect/functions/sum_moving.d.ts +0 -2
  157. package/dist/dialect/functions/sum_moving.js +0 -43
  158. package/dist/dialect/functions/trim_functions.d.ts +0 -4
  159. package/dist/dialect/functions/trim_functions.js +0 -42
  160. package/dist/dialect/functions/trunc.d.ts +0 -2
  161. package/dist/dialect/functions/trunc.js +0 -38
  162. package/dist/dialect/functions/upper.d.ts +0 -2
  163. package/dist/dialect/functions/upper.js +0 -34
  164. package/dist/dialect/postgres/functions/byte_length.d.ts +0 -2
  165. package/dist/dialect/postgres/functions/byte_length.js +0 -33
  166. package/dist/dialect/postgres/functions/dialect_functions.d.ts +0 -4
  167. package/dist/dialect/postgres/functions/dialect_functions.js +0 -11
  168. package/dist/dialect/postgres/functions/ends_with.d.ts +0 -2
  169. package/dist/dialect/postgres/functions/ends_with.js +0 -38
  170. package/dist/dialect/postgres/functions/greatest_and_least.d.ts +0 -3
  171. package/dist/dialect/postgres/functions/greatest_and_least.js +0 -43
  172. package/dist/dialect/postgres/functions/ifnull.d.ts +0 -2
  173. package/dist/dialect/postgres/functions/ifnull.js +0 -40
  174. package/dist/dialect/postgres/functions/index.d.ts +0 -1
  175. package/dist/dialect/postgres/functions/index.js +0 -28
  176. package/dist/dialect/postgres/functions/is_inf.d.ts +0 -2
  177. package/dist/dialect/postgres/functions/is_inf.js +0 -34
  178. package/dist/dialect/postgres/functions/is_nan.d.ts +0 -2
  179. package/dist/dialect/postgres/functions/is_nan.js +0 -33
  180. package/dist/dialect/postgres/functions/log.d.ts +0 -2
  181. package/dist/dialect/postgres/functions/log.js +0 -37
  182. package/dist/dialect/postgres/functions/postgres_functions.d.ts +0 -1
  183. package/dist/dialect/postgres/functions/postgres_functions.js +0 -63
  184. package/dist/dialect/postgres/functions/rand.d.ts +0 -2
  185. package/dist/dialect/postgres/functions/rand.js +0 -31
  186. package/dist/dialect/postgres/functions/regexp_extract.d.ts +0 -2
  187. package/dist/dialect/postgres/functions/regexp_extract.js +0 -35
  188. package/dist/dialect/postgres/functions/replace.d.ts +0 -2
  189. package/dist/dialect/postgres/functions/replace.js +0 -40
  190. package/dist/dialect/postgres/functions/round.d.ts +0 -2
  191. package/dist/dialect/postgres/functions/round.js +0 -39
  192. package/dist/dialect/postgres/functions/stddev.d.ts +0 -2
  193. package/dist/dialect/postgres/functions/stddev.js +0 -37
  194. package/dist/dialect/postgres/functions/string_agg.d.ts +0 -3
  195. package/dist/dialect/postgres/functions/string_agg.js +0 -55
  196. package/dist/dialect/postgres/functions/substr.d.ts +0 -2
  197. package/dist/dialect/postgres/functions/substr.js +0 -38
  198. package/dist/dialect/postgres/functions/trunc.d.ts +0 -2
  199. package/dist/dialect/postgres/functions/trunc.js +0 -40
  200. package/dist/dialect/postgres/functions/unicode.d.ts +0 -2
  201. package/dist/dialect/postgres/functions/unicode.js +0 -34
  202. package/dist/dialect/snowflake/functions/chr.d.ts +0 -2
  203. package/dist/dialect/snowflake/functions/chr.js +0 -36
  204. package/dist/dialect/snowflake/functions/dialect_functions.d.ts +0 -4
  205. package/dist/dialect/snowflake/functions/dialect_functions.js +0 -11
  206. package/dist/dialect/snowflake/functions/div.d.ts +0 -2
  207. package/dist/dialect/snowflake/functions/div.js +0 -37
  208. package/dist/dialect/snowflake/functions/index.d.ts +0 -1
  209. package/dist/dialect/snowflake/functions/index.js +0 -28
  210. package/dist/dialect/snowflake/functions/is_inf.d.ts +0 -2
  211. package/dist/dialect/snowflake/functions/is_inf.js +0 -34
  212. package/dist/dialect/snowflake/functions/is_nan.d.ts +0 -2
  213. package/dist/dialect/snowflake/functions/is_nan.js +0 -33
  214. package/dist/dialect/snowflake/functions/length.d.ts +0 -3
  215. package/dist/dialect/snowflake/functions/length.js +0 -39
  216. package/dist/dialect/snowflake/functions/log.d.ts +0 -2
  217. package/dist/dialect/snowflake/functions/log.js +0 -37
  218. package/dist/dialect/snowflake/functions/rand.d.ts +0 -2
  219. package/dist/dialect/snowflake/functions/rand.js +0 -33
  220. package/dist/dialect/snowflake/functions/regexp_extract.d.ts +0 -2
  221. package/dist/dialect/snowflake/functions/regexp_extract.js +0 -35
  222. package/dist/dialect/snowflake/functions/snowflake_functions.d.ts +0 -1
  223. package/dist/dialect/snowflake/functions/snowflake_functions.js +0 -56
  224. package/dist/dialect/snowflake/functions/starts_ends_with.d.ts +0 -3
  225. package/dist/dialect/snowflake/functions/starts_ends_with.js +0 -43
  226. package/dist/dialect/snowflake/functions/string_agg.d.ts +0 -3
  227. package/dist/dialect/snowflake/functions/string_agg.js +0 -55
  228. package/dist/dialect/snowflake/functions/strpos.d.ts +0 -2
  229. package/dist/dialect/snowflake/functions/strpos.js +0 -35
  230. package/dist/dialect/snowflake/functions/trunc.d.ts +0 -2
  231. package/dist/dialect/snowflake/functions/trunc.js +0 -39
  232. package/dist/dialect/standardsql/functions/chr.d.ts +0 -2
  233. package/dist/dialect/standardsql/functions/chr.js +0 -37
  234. package/dist/dialect/standardsql/functions/dialect_functions.d.ts +0 -4
  235. package/dist/dialect/standardsql/functions/dialect_functions.js +0 -16
  236. package/dist/dialect/standardsql/functions/index.d.ts +0 -1
  237. package/dist/dialect/standardsql/functions/index.js +0 -28
  238. package/dist/dialect/standardsql/functions/pi.d.ts +0 -2
  239. package/dist/dialect/standardsql/functions/pi.js +0 -32
  240. package/dist/dialect/standardsql/functions/standardsql_functions.d.ts +0 -1
  241. package/dist/dialect/standardsql/functions/standardsql_functions.js +0 -36
  242. package/dist/dialect/standardsql/functions/string_agg.d.ts +0 -3
  243. package/dist/dialect/standardsql/functions/string_agg.js +0 -59
  244. package/dist/dialect/trino/functions/byte_length.d.ts +0 -2
  245. package/dist/dialect/trino/functions/byte_length.js +0 -33
  246. package/dist/dialect/trino/functions/chr.d.ts +0 -4
  247. package/dist/dialect/trino/functions/chr.js +0 -45
  248. package/dist/dialect/trino/functions/concat.d.ts +0 -2
  249. package/dist/dialect/trino/functions/concat.js +0 -38
  250. package/dist/dialect/trino/functions/count_approx.d.ts +0 -2
  251. package/dist/dialect/trino/functions/count_approx.js +0 -20
  252. package/dist/dialect/trino/functions/dialect_functions.d.ts +0 -4
  253. package/dist/dialect/trino/functions/dialect_functions.js +0 -16
  254. package/dist/dialect/trino/functions/div.d.ts +0 -2
  255. package/dist/dialect/trino/functions/div.js +0 -36
  256. package/dist/dialect/trino/functions/ifnull.d.ts +0 -2
  257. package/dist/dialect/trino/functions/ifnull.js +0 -40
  258. package/dist/dialect/trino/functions/index.d.ts +0 -1
  259. package/dist/dialect/trino/functions/index.js +0 -28
  260. package/dist/dialect/trino/functions/is_inf.d.ts +0 -2
  261. package/dist/dialect/trino/functions/is_inf.js +0 -33
  262. package/dist/dialect/trino/functions/log.d.ts +0 -2
  263. package/dist/dialect/trino/functions/log.js +0 -37
  264. package/dist/dialect/trino/functions/repeat.d.ts +0 -2
  265. package/dist/dialect/trino/functions/repeat.js +0 -35
  266. package/dist/dialect/trino/functions/reverse.d.ts +0 -2
  267. package/dist/dialect/trino/functions/reverse.js +0 -34
  268. package/dist/dialect/trino/functions/starts_ends_with.d.ts +0 -3
  269. package/dist/dialect/trino/functions/starts_ends_with.js +0 -43
  270. package/dist/dialect/trino/functions/string_agg.d.ts +0 -3
  271. package/dist/dialect/trino/functions/string_agg.js +0 -55
  272. package/dist/dialect/trino/functions/trino_functions.d.ts +0 -1
  273. package/dist/dialect/trino/functions/trino_functions.js +0 -59
  274. package/dist/dialect/trino/functions/trunc.d.ts +0 -2
  275. package/dist/dialect/trino/functions/trunc.js +0 -39
@@ -1,38 +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.fnIfnull = void 0;
26
- const util_1 = require("./util");
27
- const types = [
28
- 'string',
29
- 'number',
30
- 'timestamp',
31
- 'date',
32
- 'json',
33
- ];
34
- function fnIfnull() {
35
- return types.map(type => (0, util_1.overload)((0, util_1.minScalar)(type), [(0, util_1.param)('value', (0, util_1.anyExprType)(type)), (0, util_1.param)('default', (0, util_1.anyExprType)(type))], (0, util_1.sql) `IFNULL(${(0, util_1.arg)('value')}, ${(0, util_1.arg)('default')})`));
36
- }
37
- exports.fnIfnull = fnIfnull;
38
- //# sourceMappingURL=ifnull.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnIsInf(): DialectFunctionOverloadDef[];
@@ -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.fnIsInf = void 0;
26
- const util_1 = require("./util");
27
- function fnIsInf() {
28
- return [
29
- (0, util_1.overload)((0, util_1.minScalar)('boolean'), [(0, util_1.param)('value', (0, util_1.anyExprType)('number'))], (0, util_1.sql) `COALESCE(IS_INF(${(0, util_1.arg)('value')}), false)`),
30
- ];
31
- }
32
- exports.fnIsInf = fnIsInf;
33
- //# sourceMappingURL=is_inf.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnIsNan(): DialectFunctionOverloadDef[];
@@ -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.fnIsNan = void 0;
26
- const util_1 = require("./util");
27
- function fnIsNan() {
28
- return [
29
- (0, util_1.overload)((0, util_1.minScalar)('boolean'), [(0, util_1.param)('value', (0, util_1.anyExprType)('number'))], (0, util_1.sql) `COALESCE(IS_NAN(${(0, util_1.arg)('value')}), false)`),
30
- ];
31
- }
32
- exports.fnIsNan = fnIsNan;
33
- //# sourceMappingURL=is_nan.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnLag(): DialectFunctionOverloadDef[];
@@ -1,53 +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.fnLag = void 0;
26
- const util_1 = require("./util");
27
- const types = [
28
- 'string',
29
- 'number',
30
- 'timestamp',
31
- 'date',
32
- 'json',
33
- 'boolean',
34
- ];
35
- function fnLag() {
36
- // TODO implement better "generics" -- an overload specifies names of types
37
- // and allowed types for that type name, then "params" and "returnType" can
38
- // refer to that named type...
39
- return types.flatMap(type => {
40
- const value = (0, util_1.makeParam)('value', (0, util_1.output)((0, util_1.maxAggregate)(type)));
41
- const offset = (0, util_1.makeParam)('offset', (0, util_1.literal)((0, util_1.maxScalar)('number')));
42
- const def = (0, util_1.makeParam)('default', (0, util_1.constant)((0, util_1.maxAggregate)(type)));
43
- return [
44
- (0, util_1.overload)((0, util_1.minAnalytic)(type), [value.param], (0, util_1.sql) `LAG(${value.arg})`, {
45
- needsWindowOrderBy: true,
46
- }),
47
- (0, util_1.overload)((0, util_1.minAnalytic)(type), [value.param, offset.param], (0, util_1.sql) `LAG(${value.arg}, ${offset.arg})`, { needsWindowOrderBy: true }),
48
- (0, util_1.overload)((0, util_1.minAnalytic)(type), [value.param, offset.param, def.param], (0, util_1.sql) `LAG(${value.arg}, ${offset.arg}, ${def.arg})`, { needsWindowOrderBy: true }),
49
- ];
50
- });
51
- }
52
- exports.fnLag = fnLag;
53
- //# sourceMappingURL=lag.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnLead(): DialectFunctionOverloadDef[];
@@ -1,50 +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.fnLead = void 0;
26
- const util_1 = require("./util");
27
- const types = [
28
- 'string',
29
- 'number',
30
- 'timestamp',
31
- 'date',
32
- 'json',
33
- 'boolean',
34
- ];
35
- function fnLead() {
36
- return types.flatMap(type => {
37
- const value = (0, util_1.makeParam)('value', (0, util_1.output)((0, util_1.maxAggregate)(type)));
38
- const offset = (0, util_1.makeParam)('offset', (0, util_1.literal)((0, util_1.maxScalar)('number')));
39
- const def = (0, util_1.makeParam)('default', (0, util_1.constant)((0, util_1.maxAggregate)(type)));
40
- return [
41
- (0, util_1.overload)((0, util_1.minAnalytic)(type), [value.param], (0, util_1.sql) `LEAD(${value.arg})`, {
42
- needsWindowOrderBy: true,
43
- }),
44
- (0, util_1.overload)((0, util_1.minAnalytic)(type), [value.param, offset.param], (0, util_1.sql) `LEAD(${value.arg}, ${offset.arg})`, { needsWindowOrderBy: true }),
45
- (0, util_1.overload)((0, util_1.minAnalytic)(type), [value.param, offset.param, def.param], (0, util_1.sql) `LEAD(${value.arg}, ${offset.arg}, ${def.arg})`, { needsWindowOrderBy: true }),
46
- ];
47
- });
48
- }
49
- exports.fnLead = fnLead;
50
- //# sourceMappingURL=lead.js.map
@@ -1,3 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnLength(): DialectFunctionOverloadDef[];
3
- export declare function fnByteLength(): DialectFunctionOverloadDef[];
@@ -1,40 +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.fnByteLength = exports.fnLength = void 0;
26
- const util_1 = require("./util");
27
- function fnLength() {
28
- return [
29
- (0, util_1.overload)((0, util_1.minScalar)('number'), [(0, util_1.param)('value', (0, util_1.anyExprType)('string'))], (0, util_1.sql) `LENGTH(${(0, util_1.arg)('value')})`),
30
- ];
31
- }
32
- exports.fnLength = fnLength;
33
- // TODO: add support for byte length in postgres, duckdb
34
- function fnByteLength() {
35
- return [
36
- (0, util_1.overload)((0, util_1.minScalar)('number'), [(0, util_1.param)('value', (0, util_1.anyExprType)('string'))], (0, util_1.sql) `BYTE_LENGTH(${(0, util_1.arg)('value')})`),
37
- ];
38
- }
39
- exports.fnByteLength = fnByteLength;
40
- //# sourceMappingURL=length.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnLog(): DialectFunctionOverloadDef[];
@@ -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.fnLog = void 0;
26
- const util_1 = require("./util");
27
- function fnLog() {
28
- const value = (0, util_1.makeParam)('value', (0, util_1.anyExprType)('number'));
29
- const base = (0, util_1.makeParam)('base', (0, util_1.anyExprType)('number'));
30
- return [
31
- (0, util_1.overload)((0, util_1.minScalar)('number'), [value.param, base.param], (0, util_1.sql) `LOG(${value.arg}, ${base.arg})`),
32
- ];
33
- }
34
- exports.fnLog = fnLog;
35
- //# sourceMappingURL=log.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnLower(): DialectFunctionOverloadDef[];
@@ -1,34 +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.fnLower = void 0;
26
- const util_1 = require("./util");
27
- function fnLower() {
28
- const value = (0, util_1.makeParam)('base', (0, util_1.anyExprType)('string'));
29
- return [
30
- (0, util_1.overload)((0, util_1.minScalar)('string'), [value.param], (0, util_1.sql) `LOWER(${value.arg})`),
31
- ];
32
- }
33
- exports.fnLower = fnLower;
34
- //# sourceMappingURL=lower.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnNullif(): DialectFunctionOverloadDef[];
@@ -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.fnNullif = void 0;
26
- const util_1 = require("./util");
27
- const types = [
28
- 'string',
29
- 'number',
30
- 'timestamp',
31
- 'date',
32
- 'json',
33
- ];
34
- function fnNullif() {
35
- return types.map(type => {
36
- const value1 = (0, util_1.makeParam)('value1', (0, util_1.anyExprType)(type));
37
- const value2 = (0, util_1.makeParam)('value2', (0, util_1.anyExprType)(type));
38
- return (0, util_1.overload)((0, util_1.minScalar)(type), [value1.param, value2.param], (0, util_1.sql) `NULLIF(${value1.arg}, ${value2.arg})`);
39
- });
40
- }
41
- exports.fnNullif = fnNullif;
42
- //# sourceMappingURL=nullif.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnPi(): DialectFunctionOverloadDef[];
@@ -1,31 +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.fnPi = void 0;
26
- const util_1 = require("./util");
27
- function fnPi() {
28
- return [(0, util_1.overload)((0, util_1.minScalar)('number'), [], (0, util_1.sql) `PI()`)];
29
- }
30
- exports.fnPi = fnPi;
31
- //# sourceMappingURL=pi.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnPow(): DialectFunctionOverloadDef[];
@@ -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.fnPow = void 0;
26
- const util_1 = require("./util");
27
- function fnPow() {
28
- const base = (0, util_1.makeParam)('base', (0, util_1.anyExprType)('number'));
29
- const exponent = (0, util_1.makeParam)('exponent', (0, util_1.anyExprType)('number'));
30
- return [
31
- (0, util_1.overload)((0, util_1.minScalar)('number'), [base.param, exponent.param], (0, util_1.sql) `POW(${base.arg}, ${exponent.arg})`),
32
- ];
33
- }
34
- exports.fnPow = fnPow;
35
- //# sourceMappingURL=pow.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnRand(): DialectFunctionOverloadDef[];
@@ -1,31 +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.fnRand = void 0;
26
- const util_1 = require("./util");
27
- function fnRand() {
28
- return [(0, util_1.overload)((0, util_1.minScalar)('number'), [], (0, util_1.sql) `RAND()`)];
29
- }
30
- exports.fnRand = fnRand;
31
- //# sourceMappingURL=rand.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnRank(): DialectFunctionOverloadDef[];
@@ -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.fnRank = void 0;
26
- const util_1 = require("./util");
27
- // TODO would you ever want to rank by a different thing than the order by?
28
- function fnRank() {
29
- return [
30
- (0, util_1.overload)((0, util_1.minAnalytic)('number'), [], (0, util_1.sql) `RANK()`, {
31
- needsWindowOrderBy: true,
32
- }),
33
- ];
34
- }
35
- exports.fnRank = fnRank;
36
- //# sourceMappingURL=rank.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnRegexpExtract(): DialectFunctionOverloadDef[];
@@ -1,41 +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.fnRegexpExtract = void 0;
26
- const util_1 = require("./util");
27
- function fnRegexpExtract() {
28
- const value = (0, util_1.makeParam)('value', (0, util_1.anyExprType)('string'));
29
- const pattern = (0, util_1.makeParam)('pattern', (0, util_1.anyExprType)('regular expression'));
30
- return [
31
- (0, util_1.overload)((0, util_1.minScalar)('string'), [
32
- value.param,
33
- pattern.param,
34
- // TODO consider supporting these parameters
35
- // param('position', anyExprType('number')),
36
- // param('occurrence', anyExprType('number')),
37
- ], (0, util_1.sql) `REGEXP_EXTRACT(${value.arg}, ${pattern.arg})`),
38
- ];
39
- }
40
- exports.fnRegexpExtract = fnRegexpExtract;
41
- //# sourceMappingURL=regexp_extract.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnRepeat(): DialectFunctionOverloadDef[];
@@ -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.fnRepeat = void 0;
26
- const util_1 = require("./util");
27
- function fnRepeat() {
28
- const value = (0, util_1.makeParam)('value', (0, util_1.anyExprType)('string'));
29
- const count = (0, util_1.makeParam)('count', (0, util_1.anyExprType)('number'));
30
- return [
31
- (0, util_1.overload)((0, util_1.minScalar)('string'), [value.param, count.param], (0, util_1.sql) `REPEAT(${value.arg}, ${count.arg})`),
32
- ];
33
- }
34
- exports.fnRepeat = fnRepeat;
35
- //# sourceMappingURL=repeat.js.map
@@ -1,2 +0,0 @@
1
- import { DialectFunctionOverloadDef } from './util';
2
- export declare function fnReplace(): DialectFunctionOverloadDef[];