drizzle-sybase 2.0.1 → 3.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.
Files changed (91) hide show
  1. package/README.md +72 -6
  2. package/dist/columns/index.d.ts +186 -36
  3. package/dist/columns/index.d.ts.map +1 -1
  4. package/dist/columns/index.js +113 -23
  5. package/dist/columns/index.js.map +1 -1
  6. package/dist/connection.d.ts +77 -157
  7. package/dist/connection.d.ts.map +1 -1
  8. package/dist/connection.js +244 -506
  9. package/dist/connection.js.map +1 -1
  10. package/dist/datetime.d.ts +15 -0
  11. package/dist/datetime.d.ts.map +1 -1
  12. package/dist/datetime.js +25 -0
  13. package/dist/datetime.js.map +1 -1
  14. package/dist/db.d.ts +36 -10
  15. package/dist/db.d.ts.map +1 -1
  16. package/dist/db.js +15 -25
  17. package/dist/db.js.map +1 -1
  18. package/dist/dialect.d.ts +24 -0
  19. package/dist/dialect.d.ts.map +1 -1
  20. package/dist/dialect.js +63 -9
  21. package/dist/dialect.js.map +1 -1
  22. package/dist/index.d.ts +11 -5
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +5 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/introspect/codegen.d.ts +8 -1
  27. package/dist/introspect/codegen.d.ts.map +1 -1
  28. package/dist/introspect/codegen.js +117 -29
  29. package/dist/introspect/codegen.js.map +1 -1
  30. package/dist/introspect/fetch.d.ts +9 -2
  31. package/dist/introspect/fetch.d.ts.map +1 -1
  32. package/dist/introspect/fetch.js +37 -8
  33. package/dist/introspect/fetch.js.map +1 -1
  34. package/dist/introspect/index.d.ts +1 -0
  35. package/dist/introspect/index.d.ts.map +1 -1
  36. package/dist/introspect/index.js +8 -5
  37. package/dist/introspect/index.js.map +1 -1
  38. package/dist/introspect/type-map.d.ts +17 -8
  39. package/dist/introspect/type-map.d.ts.map +1 -1
  40. package/dist/introspect/type-map.js +28 -9
  41. package/dist/introspect/type-map.js.map +1 -1
  42. package/dist/native/index.d.ts +4 -1
  43. package/dist/native/index.d.ts.map +1 -1
  44. package/dist/native/index.js.map +1 -1
  45. package/dist/native/sybase_native.darwin-arm64.node +0 -0
  46. package/dist/native/sybase_native.darwin-x64.node +0 -0
  47. package/dist/native/sybase_native.linux-arm64.node +0 -0
  48. package/dist/native/sybase_native.linux-x64.node +0 -0
  49. package/dist/native/sybase_native.win32-x64.node +0 -0
  50. package/dist/pool.d.ts +197 -0
  51. package/dist/pool.d.ts.map +1 -0
  52. package/dist/pool.js +638 -0
  53. package/dist/pool.js.map +1 -0
  54. package/dist/query-builders/delete.d.ts +6 -4
  55. package/dist/query-builders/delete.d.ts.map +1 -1
  56. package/dist/query-builders/delete.js +4 -4
  57. package/dist/query-builders/delete.js.map +1 -1
  58. package/dist/query-builders/index.d.ts +1 -1
  59. package/dist/query-builders/index.d.ts.map +1 -1
  60. package/dist/query-builders/index.js.map +1 -1
  61. package/dist/query-builders/insert.d.ts +28 -4
  62. package/dist/query-builders/insert.d.ts.map +1 -1
  63. package/dist/query-builders/insert.js +8 -5
  64. package/dist/query-builders/insert.js.map +1 -1
  65. package/dist/query-builders/select-types.d.ts +132 -0
  66. package/dist/query-builders/select-types.d.ts.map +1 -0
  67. package/dist/query-builders/select-types.js +2 -0
  68. package/dist/query-builders/select-types.js.map +1 -0
  69. package/dist/query-builders/select.d.ts +54 -34
  70. package/dist/query-builders/select.d.ts.map +1 -1
  71. package/dist/query-builders/select.js +99 -92
  72. package/dist/query-builders/select.js.map +1 -1
  73. package/dist/query-builders/update.d.ts +7 -5
  74. package/dist/query-builders/update.d.ts.map +1 -1
  75. package/dist/query-builders/update.js +4 -4
  76. package/dist/query-builders/update.js.map +1 -1
  77. package/dist/session.d.ts +141 -14
  78. package/dist/session.d.ts.map +1 -1
  79. package/dist/session.js +456 -40
  80. package/dist/session.js.map +1 -1
  81. package/dist/sql-classify.d.ts +70 -0
  82. package/dist/sql-classify.d.ts.map +1 -0
  83. package/dist/sql-classify.js +189 -0
  84. package/dist/sql-classify.js.map +1 -0
  85. package/dist/table.d.ts +85 -3
  86. package/dist/table.d.ts.map +1 -1
  87. package/dist/table.js +8 -2
  88. package/dist/table.js.map +1 -1
  89. package/package.json +9 -8
  90. package/scripts/clean.ts +4 -3
  91. package/src/native/binding.c +463 -62
package/README.md CHANGED
@@ -18,8 +18,8 @@ npm install drizzle-sybase
18
18
  ## Usage
19
19
 
20
20
  ```ts
21
- import { createSybaseDrizzle, sybaseTable, int, varchar, datetime } from "drizzle-sybase";
22
21
  import { eq, sql } from "drizzle-orm";
22
+ import { createSybaseDrizzle, sybaseTable, int, varchar, datetime } from "drizzle-sybase";
23
23
 
24
24
  // Define schema
25
25
  const users = sybaseTable("users", {
@@ -39,7 +39,7 @@ const db = createSybaseDrizzle({
39
39
  max: 10 // max pool connections
40
40
  });
41
41
 
42
- // SELECT
42
+ // SELECT — rows are keyed by property name ({ id, name, email, createdAt })
43
43
  const rows = await db.select().from(users).where(eq(users.name, "Alice"));
44
44
 
45
45
  // INSERT (returns @@identity for identity columns)
@@ -64,6 +64,48 @@ const result = await db.execute(sql`EXEC sp_helpdb`);
64
64
  await db.close();
65
65
  ```
66
66
 
67
+ ## Type Inference
68
+
69
+ Row and insert types are inferred from the table definition, matching exactly
70
+ what the driver returns at runtime:
71
+
72
+ ```ts
73
+ type User = typeof users.$inferSelect; // or InferSelectModel<typeof users>
74
+ // { id: number; name: string; email: string | null; createdAt: Date | null }
75
+
76
+ type NewUser = typeof users.$inferInsert; // or InferInsertModel<typeof users>
77
+ // { name: string; email?: string | null; createdAt?: Date | null }
78
+ ```
79
+
80
+ - **Nullability**: a column is `T | null` unless it is `.notNull()` (or a primary key).
81
+ - **Insert**: a column is required only if it is not null and nothing else fills it. Optional are columns with `.default(value)` or `.hasDatabaseDefault()` — both declare a database `DEFAULT`, as `.default()` does in drizzle: the driver omits the column and the server fills it, `value` itself is never sent — and columns with `.$defaultFn()` / `.$onUpdateFn()`, which the driver computes. Identity columns are not accepted at all; the server assigns them.
82
+ - **Select results** follow the query. `db.select()` returns the table row; `db.select({ ... })` returns one key per field — a `sql<number>` expression is a `number`, a raw string expression `unknown`. A `leftJoin` makes the joined table's columns nullable, a `rightJoin` every earlier table's. A table given by name (`from("#tmp")`) is untyped.
83
+ - **Clashing joins** do not compile: with no fields, every column lands in one flat row, so joining two tables that share a property name is a type error naming the property. Pass the fields explicitly instead.
84
+ - **Use the returned builder.** Builders change in place (as in drizzle), but only the value a method returns carries the updated type: chain the calls, or keep the result (`const joined = q.leftJoin(...)`) — a bare `q.leftJoin(...)` leaves `q` typed as before.
85
+ - **Narrowing**: `.$type<"active" | "disabled">()` narrows a column's value type.
86
+
87
+ | SQL type | Read as | Accepted on write |
88
+ | ---------------------------------------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------- |
89
+ | `int`, `smallint`, `tinyint`, `unsigned smallint`, `unsigned int`, `float`, `real` | `number` | `number` |
90
+ | `bigint`, `unsigned bigint` | `bigint` | `bigint` or a digit string |
91
+ | `numeric`/`decimal`, `money`, `smallmoney` | `string` | a digit string; also a `number` if precision ≤ 15, a `bigint` if a wider integer (see below) |
92
+ | `bit` | `boolean` | `boolean` |
93
+ | `datetime`, `smalldatetime` | `Date` | `Date` |
94
+ | `date`, `time`, `bigdatetime`, `bigtime` | `string` | `string` (see [Date and Time Columns](#date-and-time-columns)) |
95
+ | `char`, `varchar`, `nchar`, `nvarchar`, `unichar`, `univarchar`, `text` | `string` | `string` |
96
+ | `binary`, `varbinary`, `image` | `Buffer` | `Buffer` |
97
+ | `unitext` | `Buffer` | `Buffer` — UTF-16LE: `Buffer.from(s, "utf16le")` / `buf.toString("utf16le")` |
98
+
99
+ `unitext` is bytes because db-lib receives it as an image: there is no way to tell
100
+ it apart in a result, and a string literal written to it goes through the server
101
+ charset and loses what that cannot represent. UTF-16LE bytes round-trip exactly.
102
+ `ntext()` is deprecated — ASE has no such type.
103
+
104
+ Every insert/update value may also be a SQL expression, e.g. `` sql`getdate()` ``.
105
+
106
+ Comparison operators come from `drizzle-orm` and do not check the compared
107
+ value against the column type: `eq(users.id, "x")` compiles.
108
+
67
109
  ## Why not `child_process` + `tsql`?
68
110
 
69
111
  | | Old (tsql child_process) | New (native db-lib) |
@@ -134,9 +176,17 @@ This will:
134
176
 
135
177
  ## Sybase SQL Dialect Notes
136
178
 
137
- - **No LIMIT/OFFSET**: Uses `SET ROWCOUNT` for pagination
179
+ - **No LIMIT/OFFSET**: `limit()` is `SELECT TOP n` (offsets fetch `offset + limit` rows and skip the first `offset`); `limit()`/`offset()` take non-negative integers only. TOP, unlike `SET ROWCOUNT`, leaves nothing set on the connection
138
180
  - **No RETURNING**: Uses `SELECT @@identity` after INSERT
139
- - **No multi-row VALUES**: Each row is a separate INSERT statement
181
+ - **No multi-row VALUES**: Each row is a separate INSERT statement; a multi-row insert runs all-or-nothing (in its own transaction, or under a savepoint inside `db.transaction`), so its locks are held until the last row is written
182
+ - **No CTEs (`WITH`) and no `FULL OUTER JOIN`**: ASE supports neither; use derived tables / `UNION` of left and right joins
183
+ - **Server-aborted transactions**: ASE rolls a transaction back on its own after some errors (conversion, divide-by-zero, deadlock). Once that happens the `tx` handle refuses further statements and `db.transaction` rejects instead of committing
184
+ - **Raw multi-statement batches are not atomic**: after a statement-level error (e.g. a duplicate key) ASE carries on with the rest of the batch, so earlier and later statements may already be applied when the error is reported. Run such batches inside `db.transaction()` if they must be all-or-nothing
185
+ - **Session state does not leak between pool users**: a connection always returns to the pool with no open transaction, `ROWCOUNT 0`, chained mode off, its original isolation level and the configured database. A raw statement outside `db.transaction()` that leaves a transaction open is rolled back and reported as an error — use `db.transaction()` instead. A connection that ran `setuser` is discarded rather than reused, since its original identity cannot be restored reliably. Other `SET` options (`dateformat`, `textsize`, ...) are not reset
186
+ - **Inside `db.transaction()`, the callback must not end the transaction itself**: a batch containing `COMMIT` or a `ROLLBACK` without a savepoint name is refused before it is sent — once it ran, the rest of its batch would run in autocommit. A procedure that commits or rolls back cannot be seen in the SQL: the driver detects it after the call and refuses every later statement (what the procedure committed stays committed). Savepoints (`save tran x` / `rollback tran x`) are fine
187
+ - **Results are capped at 1,000,000 rows**: a larger result fails rather than being silently cut short. Pass `maxRows` to accept a truncated result
188
+ - **Packet size**: `packetSize` defaults to 2048, ASE's out-of-the-box `max network packet size`. A server whose limit was raised (e.g. to 4096) can take a larger value for fewer round-trips on big results; one whose limit was lowered (it can go down to 512) needs a smaller one. A request above the server's limit is refused with the same "Login failed" (Msg 4002) as a wrong password — the error message points this out
189
+ - **Temporary tables do not outlive their query or transaction**: a `#temp` table created by a pool query is dropped when that query finishes (the next one may run on another connection), and one created inside `db.transaction()` is dropped when the transaction ends. To use one across several statements, run them in `db.withConnection(async conn => ...)`: one connection, no transaction, and its `#temp` tables are dropped when the callback returns. (Inside `db.transaction()` ASE only allows creating them when `ddl in tran` is enabled.)
140
190
  - **Identifiers**: Quoted with `[brackets]`
141
191
  - **Date format**: `'YYYY-MM-DD HH:MM:SS.mmm'` (no T separator)
142
192
 
@@ -203,7 +253,7 @@ await db.update(winf).set({ totPrRoyalty: total.toFixed(4) }).where(...);
203
253
 
204
254
  `$mapToDriver` can do that last step per column. There is no `$mapFromDriver`:
205
255
  results are decoded from the type metadata the addon reports, and at that point
206
- the query's schema is no longer available — `db.select()` may return `*`, joined
256
+ the query's schema is no longer available — `db.select().from("NAME")` returns `*`, joined
207
257
  columns can share a name, and an aggregate belongs to no column. Converting on
208
258
  read is a line at the use site instead.
209
259
 
@@ -242,6 +292,13 @@ query. Leaving `timeZone` unset makes reads and writes exact inverses in UTC,
242
292
  which is correct as long as nothing else interprets the stored values; set it when
243
293
  the stored wall clocks are meant to be a particular zone's local time.
244
294
 
295
+ **Set it to the zone the server's clock is in.** Values written by the server
296
+ itself (`getdate()`, column defaults, other applications) are in that zone, and
297
+ reading them as another would shift every one by the difference. When a
298
+ connection opens, the driver compares the server's offset (`getdate()` against
299
+ `getutcdate()`) with `timeZone`'s and, if they differ, emits a process warning
300
+ with code `DRIZZLE_SYBASE_TIMEZONE`, once per server, database and zone.
301
+
245
302
  A stored wall clock cannot always be mapped to one instant, because the column
246
303
  holds no offset. Both cases follow `Temporal`'s `compatible` disambiguation,
247
304
  which is also what `new Date("YYYY-MM-DDTHH:mm")` does with the process zone:
@@ -273,6 +330,14 @@ several common locales drops the seconds and milliseconds entirely — under
273
330
  Reverse-engineer Sybase ASE tables into drizzle-sybase definitions, Zod
274
331
  schemas, and TypeScript types — the Sybase equivalent of `drizzle-kit pull`.
275
332
 
333
+ The generated file imports `zod`, which this package does not depend on:
334
+ install it in the project that uses the generated code (`npm i zod`; the output
335
+ is checked against Zod 4). The `<Table>Row` / `New<Table>` types it exports are
336
+ identical to `typeof table.$inferSelect` / `$inferInsert`.
337
+
338
+ `nchar`/`nvarchar` lengths are read in characters using the server's own
339
+ `@@ncharsize`, so they are right on single-byte server charsets too.
340
+
276
341
  ### CLI
277
342
 
278
343
  ```bash
@@ -290,9 +355,10 @@ Omit `--out` to print to stdout, and omit `--tables` to introspect all user tabl
290
355
  ### Programmatic
291
356
 
292
357
  ```ts
293
- import { introspectSybase, introspectWith } from "drizzle-sybase/introspect";
294
358
  import { writeFileSync } from "node:fs";
295
359
 
360
+ import { introspectSybase, introspectWith } from "drizzle-sybase/introspect";
361
+
296
362
  // Self-contained: opens a short-lived pool and closes it.
297
363
  const { code, warnings } = await introspectSybase({
298
364
  host: "sybase-host",
@@ -7,14 +7,73 @@
7
7
  *
8
8
  * Does NOT depend on drizzle-orm/mssql-core.
9
9
  */
10
+ import type { SQL, SQLWrapper } from "drizzle-orm";
11
+ /** drizzle's handle from an aliased column back to the column it aliases. */
12
+ export declare const OriginalColumn: unique symbol;
13
+ /**
14
+ * What the type system knows about a column. Carried by builders and built
15
+ * columns as a phantom (`_`), never present at runtime.
16
+ *
17
+ * `data` and `write` differ on purpose: an exact numeric column is *read* as a
18
+ * string (so no digits are lost), but may be *written* from any JS value it can
19
+ * hold exactly.
20
+ */
21
+ export interface SybaseColumnTypeConfig {
22
+ /** JS type a select returns for a non-null value (see `binding.c`). */
23
+ data: unknown;
24
+ /** JS types an insert or update accepts for a non-null value. */
25
+ write: unknown;
26
+ notNull: boolean;
27
+ /** Omittable on insert: a default, a `$defaultFn` / `$onUpdateFn`, or one the database supplies. */
28
+ hasDefault: boolean;
29
+ /** Assigned by the server; never written. */
30
+ identity: boolean;
31
+ }
32
+ /** Initial config for a column factory: nullable, no default, not an identity. */
33
+ type ColumnOf<TData, TWrite = TData> = {
34
+ data: TData;
35
+ write: TWrite;
36
+ notNull: false;
37
+ hasDefault: false;
38
+ identity: false;
39
+ };
40
+ /** `T` with the keys of `U` replaced. */
41
+ type With<T extends SybaseColumnTypeConfig, U extends Partial<SybaseColumnTypeConfig>> = {
42
+ [K in keyof SybaseColumnTypeConfig]: K extends keyof U ? U[K] : T[K];
43
+ };
44
+ /** Precisions whose every value a double holds exactly (`MAX_EXACT_DECIMAL_DIGITS`). */
45
+ type ExactPrecision = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
46
+ /**
47
+ * What a fixed-point column accepts on write, from its declared width — the
48
+ * same decision `decimalRepresentation` makes for the generated Zod schemas:
49
+ * a `number` only where a double holds every value, a `bigint` only for
50
+ * integers too wide for one, and a digit string always.
51
+ */
52
+ type DecimalWrite<P, S> = [P] extends [undefined] ? string : number extends P ? string : P extends ExactPrecision ? number | string : P extends 0 ? string : [S] extends [0 | undefined] ? bigint | string : string;
53
+ /** A literal option's type, or `undefined` when the option was not given. */
54
+ type OptionOf<O, K extends string> = O extends {
55
+ [P in K]: infer V;
56
+ } ? V : undefined;
57
+ /** Anything carrying a column type config: a builder or a built column. */
58
+ type HasColumnType = {
59
+ readonly _: SybaseColumnTypeConfig;
60
+ };
61
+ /** The value a select returns for this column. */
62
+ export type SybaseColumnRead<C extends HasColumnType> = C["_"]["notNull"] extends true ? C["_"]["data"] : C["_"]["data"] | null;
63
+ /** The value an insert or update may write to this column. */
64
+ export type SybaseColumnWrite<C extends HasColumnType> = C["_"]["notNull"] extends true ? C["_"]["write"] : C["_"]["write"] | null;
10
65
  declare const entityKind: unique symbol;
11
66
  /**
12
67
  * Column instance that is attached to tables. Recognized by drizzle-orm's
13
68
  * `is(col, Column)` because our prototype chain includes a class with
14
69
  * `static [entityKind] = "Column"`.
15
70
  */
16
- export declare class SybaseColumn {
71
+ export declare class SybaseColumn<T extends SybaseColumnTypeConfig = SybaseColumnTypeConfig, TTableKey extends string = string> {
17
72
  static [entityKind]: string;
73
+ /** Type-level description of the column (phantom: absent at runtime). */
74
+ readonly _: T & {
75
+ tableKey: TTableKey;
76
+ };
18
77
  name: string;
19
78
  table: any;
20
79
  isAlias: boolean;
@@ -47,7 +106,15 @@ export declare class SybaseColumn {
47
106
  constructor(table: any, config: SybaseColumnConfig);
48
107
  getSQLType(): string;
49
108
  shouldDisableInsert(): boolean;
50
- getSQL(): any;
109
+ getSQL(): SQL<SybaseColumnRead<this>>;
110
+ /**
111
+ * The column under an alias, as drizzle's `column.as()`: in SQL it renders as
112
+ * the alias alone (e.g. to order by a select alias); as a select field it
113
+ * selects this column.
114
+ */
115
+ as(alias: string): this;
116
+ /** @internal What drizzle's alias proxy resolves back to. */
117
+ [OriginalColumn](): this;
51
118
  }
52
119
  export interface SybaseColumnConfig {
53
120
  name: string;
@@ -62,62 +129,145 @@ export interface SybaseColumnConfig {
62
129
  identity?: boolean;
63
130
  mapToDriverValue?: (value: any) => any;
64
131
  }
65
- export declare class SybaseColumnBuilder {
132
+ export declare class SybaseColumnBuilder<T extends SybaseColumnTypeConfig = SybaseColumnTypeConfig> {
133
+ /** Type-level description of the column (phantom: absent at runtime). */
134
+ readonly _: T;
66
135
  /** @internal */
67
136
  _config: SybaseColumnConfig;
68
137
  constructor(name: string, sqlType: string);
69
- primaryKey(): this;
70
- notNull(): this;
71
- identity(): this;
72
- default(value: unknown): this;
73
- $defaultFn(fn: () => unknown): this;
74
- $onUpdateFn(fn: () => unknown): this;
138
+ primaryKey(): SybaseColumnBuilder<With<T, {
139
+ notNull: true;
140
+ }>>;
141
+ notNull(): SybaseColumnBuilder<With<T, {
142
+ notNull: true;
143
+ }>>;
144
+ identity(): SybaseColumnBuilder<With<T, {
145
+ identity: true;
146
+ }>>;
147
+ /**
148
+ * Declare the default the database applies (the column's `DEFAULT`), as in
149
+ * drizzle: an insert may omit the column, and the driver then leaves it out
150
+ * of the statement so the server fills it. `value` is documentation only —
151
+ * it is never sent. For a default computed by the client, use
152
+ * {@link $defaultFn}.
153
+ */
154
+ default(value: T["write"] | SQLWrapper): SybaseColumnBuilder<With<T, {
155
+ hasDefault: true;
156
+ }>>;
75
157
  /**
76
- * Set a custom mapToDriverValue function for this column.
158
+ * The database supplies a value when an insert omits the column (a `DEFAULT`
159
+ * constraint or a bound default), so inserts may leave it out. Like
160
+ * {@link default}, without stating the value — what the schema generator
161
+ * emits, since a catalog default is SQL text rather than a JS value.
77
162
  */
78
- $mapToDriver(fn: (value: any) => any): this;
163
+ hasDatabaseDefault(): SybaseColumnBuilder<With<T, {
164
+ hasDefault: true;
165
+ }>>;
166
+ $defaultFn(fn: () => T["write"] | SQLWrapper): SybaseColumnBuilder<With<T, {
167
+ hasDefault: true;
168
+ }>>;
169
+ /** Also applied on insert when the column is omitted, so inserts may leave it out. */
170
+ $onUpdateFn(fn: () => T["write"] | SQLWrapper): SybaseColumnBuilder<With<T, {
171
+ hasDefault: true;
172
+ }>>;
173
+ /**
174
+ * Set a custom mapToDriverValue function for this column. The values an
175
+ * insert or update accepts become what `fn` takes; reads are unaffected
176
+ * (there is no read-side hook — see `SybaseColumn#mapToDriverValue`).
177
+ */
178
+ $mapToDriver<TInput>(fn: (value: TInput) => T["write"]): SybaseColumnBuilder<With<T, {
179
+ write: TInput;
180
+ }>>;
181
+ /**
182
+ * Narrow the column's value type, e.g. to a union of string literals. Types
183
+ * only: the driver still returns what the SQL type decodes to, so `TData`
184
+ * must be a subtype of it.
185
+ */
186
+ $type<TData extends T["data"] & T["write"]>(): SybaseColumnBuilder<With<T, {
187
+ data: TData;
188
+ write: TData;
189
+ }>>;
79
190
  /** @internal — called by sybaseTable to produce the final Column object */
80
- build(table: any): SybaseColumn;
191
+ build<TTableKey extends string>(table: any): SybaseColumn<T, TTableKey>;
81
192
  }
82
- export declare const int: (name: string) => SybaseColumnBuilder;
83
- export declare const bigint: (name: string) => SybaseColumnBuilder;
84
- export declare const smallint: (name: string) => SybaseColumnBuilder;
85
- export declare const tinyint: (name: string) => SybaseColumnBuilder;
193
+ export declare const int: (name: string) => SybaseColumnBuilder<ColumnOf<number, number>>;
194
+ /** 64-bit: read as a `BigInt`; written from a `BigInt` or a digit string, never a lossy `number`. */
195
+ export declare const bigint: (name: string) => SybaseColumnBuilder<ColumnOf<bigint, string | bigint>>;
196
+ export declare const smallint: (name: string) => SybaseColumnBuilder<ColumnOf<number, number>>;
197
+ export declare const tinyint: (name: string) => SybaseColumnBuilder<ColumnOf<number, number>>;
198
+ export declare const unsignedSmallint: (name: string) => SybaseColumnBuilder<ColumnOf<number, number>>;
199
+ /** Up to 4294967295: past an `int`, but exact in a `number`. */
200
+ export declare const unsignedInt: (name: string) => SybaseColumnBuilder<ColumnOf<number, number>>;
201
+ /** Up to 18446744073709551615: read as a `BigInt`; written from a `BigInt` or a digit string. */
202
+ export declare const unsignedBigint: (name: string) => SybaseColumnBuilder<ColumnOf<bigint, string | bigint>>;
86
203
  export declare const varchar: (name: string, opts?: {
87
204
  length?: number;
88
- }) => SybaseColumnBuilder;
205
+ }) => SybaseColumnBuilder<ColumnOf<string, string>>;
89
206
  export declare const nvarchar: (name: string, opts?: {
90
207
  length?: number;
91
- }) => SybaseColumnBuilder;
208
+ }) => SybaseColumnBuilder<ColumnOf<string, string>>;
92
209
  export declare const char: (name: string, opts?: {
93
210
  length?: number;
94
- }) => SybaseColumnBuilder;
211
+ }) => SybaseColumnBuilder<ColumnOf<string, string>>;
95
212
  export declare const nchar: (name: string, opts?: {
96
213
  length?: number;
97
- }) => SybaseColumnBuilder;
98
- export declare const text: (name: string) => SybaseColumnBuilder;
99
- export declare const ntext: (name: string) => SybaseColumnBuilder;
100
- export declare const datetime: (name: string) => SybaseColumnBuilder;
101
- export declare const smalldatetime: (name: string) => SybaseColumnBuilder;
102
- export declare const numeric: (name: string, opts?: {
214
+ }) => SybaseColumnBuilder<ColumnOf<string, string>>;
215
+ export declare const univarchar: (name: string, opts?: {
216
+ length?: number;
217
+ }) => SybaseColumnBuilder<ColumnOf<string, string>>;
218
+ export declare const unichar: (name: string, opts?: {
219
+ length?: number;
220
+ }) => SybaseColumnBuilder<ColumnOf<string, string>>;
221
+ export declare const text: (name: string) => SybaseColumnBuilder<ColumnOf<string, string>>;
222
+ /**
223
+ * ASE has no `ntext` type — use `text`, or `unitext` for Unicode. Kept so
224
+ * existing schemas compile; it behaves exactly like `text`.
225
+ *
226
+ * @deprecated ASE has no `ntext` type.
227
+ */
228
+ export declare const ntext: (name: string) => SybaseColumnBuilder<ColumnOf<string, string>>;
229
+ /**
230
+ * Unicode text, read and written as UTF-16LE bytes. db-lib receives it as an
231
+ * image, so reads arrive undecoded; and a string literal is converted through
232
+ * the server charset, which mangles anything it cannot represent. Raw bytes
233
+ * round-trip exactly (checked against ASE 15.7):
234
+ * `Buffer.from(text, "utf16le")` to write, `buffer.toString("utf16le")` to read.
235
+ */
236
+ export declare const unitext: (name: string) => SybaseColumnBuilder<ColumnOf<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>;
237
+ export declare const datetime: (name: string) => SybaseColumnBuilder<ColumnOf<Date, Date>>;
238
+ export declare const smalldatetime: (name: string) => SybaseColumnBuilder<ColumnOf<Date, Date>>;
239
+ /**
240
+ * A calendar date (`YYYY-MM-DD`). Read as text, not a `Date`: it is not an
241
+ * instant, and a `Date` would place it in some time zone.
242
+ */
243
+ export declare const date: (name: string) => SybaseColumnBuilder<ColumnOf<string, string>>;
244
+ /** A time of day (`HH:MM:SS.mmm`), read as text for the same reason as {@link date}. */
245
+ export declare const time: (name: string) => SybaseColumnBuilder<ColumnOf<string, string>>;
246
+ /** Microsecond precision, finer than a `Date` holds: read and written as text. */
247
+ export declare const bigdatetime: (name: string) => SybaseColumnBuilder<ColumnOf<string, string>>;
248
+ /** Microsecond precision, finer than a `Date` holds: read and written as text. */
249
+ export declare const bigtime: (name: string) => SybaseColumnBuilder<ColumnOf<string, string>>;
250
+ export declare const numeric: <const O extends {
103
251
  precision?: number;
104
252
  scale?: number;
105
- }) => SybaseColumnBuilder;
106
- export declare const decimal: (name: string, opts?: {
253
+ } = Record<never, never>>(name: string, opts?: O) => SybaseColumnBuilder<ColumnOf<string, DecimalWrite<OptionOf<O, "precision">, OptionOf<O, "scale">>>>;
254
+ export declare const decimal: <const O extends {
107
255
  precision?: number;
108
256
  scale?: number;
109
- }) => SybaseColumnBuilder;
110
- export declare const float: (name: string) => SybaseColumnBuilder;
111
- export declare const real: (name: string) => SybaseColumnBuilder;
112
- export declare const money: (name: string) => SybaseColumnBuilder;
113
- export declare const smallmoney: (name: string) => SybaseColumnBuilder;
114
- export declare const bit: (name: string) => SybaseColumnBuilder;
257
+ } = Record<never, never>>(name: string, opts?: O) => SybaseColumnBuilder<ColumnOf<string, DecimalWrite<OptionOf<O, "precision">, OptionOf<O, "scale">>>>;
258
+ export declare const float: (name: string) => SybaseColumnBuilder<ColumnOf<number, number>>;
259
+ export declare const real: (name: string) => SybaseColumnBuilder<ColumnOf<number, number>>;
260
+ /** `money` is numeric(19,4): wider than a double, so it is written from digit strings only. */
261
+ export declare const money: (name: string) => SybaseColumnBuilder<ColumnOf<string, string>>;
262
+ /** `smallmoney` is numeric(10,4): a double holds it, so a `number` is accepted too. */
263
+ export declare const smallmoney: (name: string) => SybaseColumnBuilder<ColumnOf<string, string | number>>;
264
+ export declare const bit: (name: string) => SybaseColumnBuilder<ColumnOf<boolean, boolean>>;
115
265
  export declare const binary: (name: string, opts?: {
116
266
  length?: number;
117
- }) => SybaseColumnBuilder;
267
+ }) => SybaseColumnBuilder<ColumnOf<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>;
118
268
  export declare const varbinary: (name: string, opts?: {
119
269
  length?: number;
120
- }) => SybaseColumnBuilder;
121
- export declare const image: (name: string) => SybaseColumnBuilder;
270
+ }) => SybaseColumnBuilder<ColumnOf<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>;
271
+ export declare const image: (name: string) => SybaseColumnBuilder<ColumnOf<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>>;
122
272
  export {};
123
273
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/columns/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,QAAA,MAAM,UAAU,eAAmC,CAAC;AAmBpD;;;;GAIG;AACH,qBAAa,YAAY;IACvB,MAAM,CAAC,CAAC,UAAU,CAAC,SAAkB;IAGrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,UAAS;IAGhB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;;;;;OAOG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;IAEtC,YAAY,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,EAcjD;IAED,UAAU,IAAI,MAAM,CAEnB;IAED,mBAAmB,IAAI,OAAO,CAE7B;IAGD,MAAM,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