@vibeorm/sql 2.0.0-alpha.7 → 2.0.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.
@@ -0,0 +1,14 @@
1
+ /** Render encoded elements as a postgres array literal (`{A,"B,C",NULL}`). */
2
+ export declare function toPgArrayLiteral(params: {
3
+ values: readonly unknown[];
4
+ }): string;
5
+ /**
6
+ * Parse a postgres array literal into its elements, or `null` when the text is
7
+ * not a literal (defensive — the value then passes through untouched).
8
+ * Unquoted `NULL` is SQL NULL; postgres quotes any element that could be
9
+ * mistaken for it.
10
+ */
11
+ export declare function parsePgArrayLiteral(params: {
12
+ literal: string;
13
+ }): (string | null)[] | null;
14
+ //# sourceMappingURL=pg-array.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pg-array.d.ts","sourceRoot":"","sources":["../src/pg-array.ts"],"names":[],"mappings":"AAGA,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,GAAG,MAAM,CAQ/E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAG,IAAI,CAkCzF"}
package/dist/render.d.ts CHANGED
@@ -1,12 +1,6 @@
1
- /**
2
- * Statement renderer: SQL AST × dialect → { text, values, returning }.
3
- *
4
- * The shared grammar lives here; every dialect divergence goes through an
5
- * explicit SqlDialect strategy field. Malformed ASTs throw VIBE_INTERNAL —
6
- * the AST is built by VibeORM code, so a bad shape is always our bug.
7
- */
1
+ import type { DiagnosticStatement } from "./dialects/diagnostics.ts";
8
2
  import type { SqlFragmentSpec } from "@vibeorm/schema";
9
- import type { SqlStatement, SqlExpr } from "./ast.ts";
3
+ import type { SqlStatement, RlsReadinessStatement, RlsProbeTableStatement, RlsPolicyPathStatement, SqlExpr } from "./ast.ts";
10
4
  import type { SqlDialect } from "./dialect.ts";
11
5
  import { ParamCollector } from "./params.ts";
12
6
  export type RenderedQuery = {
@@ -20,7 +14,7 @@ export type RenderedQuery = {
20
14
  };
21
15
  export declare function renderStatement(params: {
22
16
  dialect: SqlDialect;
23
- statement: SqlStatement;
17
+ statement: DiagnosticStatement | SqlStatement | RlsReadinessStatement | RlsProbeTableStatement | RlsPolicyPathStatement;
24
18
  }): RenderedQuery;
25
19
  /**
26
20
  * Render one boolean expression into SQL text, collecting parameters into the
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAqB,YAAY,EAAE,OAAO,EAAY,MAAM,UAAU,CAAC;AAanF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;CACnD,CAAC;AAIF,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,YAAY,CAAA;CAAE,GAAG,aAAa,CAavG;AAgGD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,cAAc,CAAA;CAAE,GAAG,MAAM,CA8J5G;AAID;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;I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C;CAC3B,GAAG,MAAM,CAaT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeorm/sql",
3
- "version": "2.0.0-alpha.7",
3
+ "version": "2.0.0",
4
4
  "description": "Dialect-aware SQL layer for VibeORM v2 — SQL AST, renderers and capability tables for postgres, sqlite and mysql",
5
5
  "keywords": [
6
6
  "orm",
@@ -44,7 +44,7 @@
44
44
  "bun": ">=1.2.0"
45
45
  },
46
46
  "dependencies": {
47
- "@vibeorm/schema": "2.0.0-alpha.7"
47
+ "@vibeorm/schema": "2.0.0"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"