sqllens 1.2.0 → 1.4.0

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 (47) hide show
  1. package/THIRD-PARTY-NOTICES.md +31 -6
  2. package/dist/api.d.ts +2 -0
  3. package/dist/api.js +2 -0
  4. package/dist/bigquery/fn-docs.generated.d.ts +2 -0
  5. package/dist/bigquery/fn-docs.generated.js +1704 -0
  6. package/dist/completion/complete.js +13 -4
  7. package/dist/completion/jinja-slot.d.ts +6 -0
  8. package/dist/completion/jinja-slot.js +13 -3
  9. package/dist/databricks/fn-docs.generated.d.ts +2 -0
  10. package/dist/databricks/fn-docs.generated.js +3257 -0
  11. package/dist/duckdb/fn-docs.generated.d.ts +2 -0
  12. package/dist/duckdb/fn-docs.generated.js +2051 -0
  13. package/dist/duckdb/fold.js +6 -4
  14. package/dist/ident/fold.d.ts +5 -2
  15. package/dist/ident/fold.js +2 -0
  16. package/dist/index.d.ts +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/infer/types.js +4 -1
  19. package/dist/minijinja/apply-tags.js +19 -10
  20. package/dist/mysql/fn-docs.generated.d.ts +2 -0
  21. package/dist/mysql/fn-docs.generated.js +1204 -0
  22. package/dist/parse-diagnostics.js +33 -1
  23. package/dist/postgres/fn-docs.generated.d.ts +2 -0
  24. package/dist/postgres/fn-docs.generated.js +2818 -0
  25. package/dist/postgres/fold.js +9 -3
  26. package/dist/postgres/signatures.generated.js +585 -585
  27. package/dist/qualify/template-provider.d.ts +5 -2
  28. package/dist/qualify/template-provider.js +5 -2
  29. package/dist/redshift/fn-docs.generated.d.ts +2 -0
  30. package/dist/redshift/fn-docs.generated.js +1457 -0
  31. package/dist/redshift/fold.js +6 -4
  32. package/dist/sema/resolve.js +3 -1
  33. package/dist/signature/docs.d.ts +16 -0
  34. package/dist/signature/docs.js +47 -0
  35. package/dist/signature/render.d.ts +7 -0
  36. package/dist/signature/render.js +40 -0
  37. package/dist/signature/signature.js +5 -5
  38. package/dist/snowflake/fn-docs.generated.d.ts +2 -0
  39. package/dist/snowflake/fn-docs.generated.js +2461 -0
  40. package/dist/sqlite/fn-docs.generated.d.ts +2 -0
  41. package/dist/sqlite/fn-docs.generated.js +609 -0
  42. package/dist/sqlite/fold.js +5 -7
  43. package/dist/trino/fn-docs.generated.d.ts +2 -0
  44. package/dist/trino/fn-docs.generated.js +1932 -0
  45. package/dist/tsql/fn-docs.generated.d.ts +2 -0
  46. package/dist/tsql/fn-docs.generated.js +1017 -0
  47. package/package.json +1 -1
@@ -110,8 +110,11 @@ export declare class DefaultTemplateProvider implements SchemaProvider {
110
110
  * the table names). `argIndex` is -1 when the caret is still in the callee name itself, so a host
111
111
  * can answer the macro/callee names it knows. `packageName` is the dotted package (`dbt_utils` in
112
112
  * `dbt_utils.star(...)`). The NEUTRAL provider knows no vocabulary and offers none; a host answers
113
- * from its catalog. `completeAt` reads this when the caret is inside a jinja tag. */
114
- templateCandidates(_callee: string, _argIndex: number, _packageName?: string): TemplateCandidate[];
113
+ * from its catalog. `completeAt` reads this when the caret is inside a jinja tag. The WHOLE
114
+ * parsed call comes along (issue #37) — a slot's candidates can depend on the sibling args:
115
+ * `source('raw', '|')`'s candidates are the tables OF the source named in `call.args[0]`.
116
+ * `argIndex` is the positional arg the caret is in (`-1` = the callee-name slot). */
117
+ templateCandidates(_call: TemplateCall, _argIndex: number): TemplateCandidate[];
115
118
  /**
116
119
  * Everything known about `call`, composed from the granular methods. Field precedence for the
117
120
  * shape (channel-agreed): an EXPLICIT `shapeOf` answer always wins; absent, derived
@@ -137,8 +137,11 @@ export class DefaultTemplateProvider {
137
137
  * the table names). `argIndex` is -1 when the caret is still in the callee name itself, so a host
138
138
  * can answer the macro/callee names it knows. `packageName` is the dotted package (`dbt_utils` in
139
139
  * `dbt_utils.star(...)`). The NEUTRAL provider knows no vocabulary and offers none; a host answers
140
- * from its catalog. `completeAt` reads this when the caret is inside a jinja tag. */
141
- templateCandidates(_callee, _argIndex, _packageName) {
140
+ * from its catalog. `completeAt` reads this when the caret is inside a jinja tag. The WHOLE
141
+ * parsed call comes along (issue #37) — a slot's candidates can depend on the sibling args:
142
+ * `source('raw', '|')`'s candidates are the tables OF the source named in `call.args[0]`.
143
+ * `argIndex` is the positional arg the caret is in (`-1` = the callee-name slot). */
144
+ templateCandidates(_call, _argIndex) {
142
145
  return [];
143
146
  }
144
147
  // --- The composed entry the ENGINE consults (rarely overridden wholesale). ---
@@ -0,0 +1,2 @@
1
+ import type { FnDoc } from "../signature/docs.js";
2
+ export declare const REDSHIFT_FN_DOCS: Record<string, FnDoc>;