sqllens 1.2.0 → 1.3.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 (42) 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/jinja-slot.js +6 -1
  7. package/dist/databricks/fn-docs.generated.d.ts +2 -0
  8. package/dist/databricks/fn-docs.generated.js +3257 -0
  9. package/dist/duckdb/fn-docs.generated.d.ts +2 -0
  10. package/dist/duckdb/fn-docs.generated.js +2051 -0
  11. package/dist/duckdb/fold.js +6 -4
  12. package/dist/ident/fold.d.ts +5 -2
  13. package/dist/ident/fold.js +2 -0
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +1 -1
  16. package/dist/infer/types.js +4 -1
  17. package/dist/mysql/fn-docs.generated.d.ts +2 -0
  18. package/dist/mysql/fn-docs.generated.js +1204 -0
  19. package/dist/parse-diagnostics.js +33 -1
  20. package/dist/postgres/fn-docs.generated.d.ts +2 -0
  21. package/dist/postgres/fn-docs.generated.js +2818 -0
  22. package/dist/postgres/fold.js +9 -3
  23. package/dist/postgres/signatures.generated.js +585 -585
  24. package/dist/redshift/fn-docs.generated.d.ts +2 -0
  25. package/dist/redshift/fn-docs.generated.js +1457 -0
  26. package/dist/redshift/fold.js +6 -4
  27. package/dist/sema/resolve.js +3 -1
  28. package/dist/signature/docs.d.ts +16 -0
  29. package/dist/signature/docs.js +47 -0
  30. package/dist/signature/render.d.ts +7 -0
  31. package/dist/signature/render.js +40 -0
  32. package/dist/signature/signature.js +5 -5
  33. package/dist/snowflake/fn-docs.generated.d.ts +2 -0
  34. package/dist/snowflake/fn-docs.generated.js +2461 -0
  35. package/dist/sqlite/fn-docs.generated.d.ts +2 -0
  36. package/dist/sqlite/fn-docs.generated.js +609 -0
  37. package/dist/sqlite/fold.js +5 -7
  38. package/dist/trino/fn-docs.generated.d.ts +2 -0
  39. package/dist/trino/fn-docs.generated.js +1932 -0
  40. package/dist/tsql/fn-docs.generated.d.ts +2 -0
  41. package/dist/tsql/fn-docs.generated.js +1017 -0
  42. package/package.json +1 -1
@@ -5,13 +5,19 @@
5
5
  // postgresql.org/docs/18/sql-syntax-lexical.html §4.1.1 — verified live: "unquoted names are
6
6
  // always folded to lower case"; "Quoting an identifier also makes it case-sensitive" — example
7
7
  // "the identifiers FOO, foo, and "foo" are considered the same by PostgreSQL, but "Foo" and
8
- // "FOO" are different." Doubled-quote escape: "To include a double quote, write two double
9
- // quotes."
8
+ // "FOO" are different." The manual is silent on the fold's character scope; the engine source
9
+ // is the authority there (#22): the default downcase path folds ASCII only (pg_downcase_ident →
10
+ // strlower_c → pg_ascii_tolower; pre-refactor downcase_identifier locale-folded high-bit bytes
11
+ // only in single-byte server encodings), so in a UTF-8 database, the universal default, `Ä` and
12
+ // `ä` are distinct unquoted identifiers. Hence ascii-lower for unquoted. A non-C locale provider
13
+ // or single-byte encoding could fold more, but that is server state invisible to the SQL text
14
+ // (same documented boundary as mysql's lower_case_table_names). Doubled-quote escape: "To include
15
+ // a double quote, write two double quotes."
10
16
  import { displayWith, foldWith } from "../ident/fold.js";
11
17
  const DOUBLE_QUOTE = ['"', '"'];
12
18
  export const POSTGRES_FOLD_RULE = {
13
19
  delimiters: [DOUBLE_QUOTE],
14
- unquoted: "lower",
20
+ unquoted: "ascii-lower",
15
21
  quoted: "preserve",
16
22
  };
17
23
  /** Fold an identifier to its PostgreSQL identity key. */