@mastra/cloudflare-d1 0.0.0-support-d1-client-20250701191943 → 0.0.0-suspendRuntimeContextTypeFix-20250930142630
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.
- package/CHANGELOG.md +1140 -0
- package/LICENSE.md +11 -42
- package/dist/index.cjs +1562 -694
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -7
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1563 -695
- package/dist/index.js.map +1 -0
- package/dist/storage/domains/legacy-evals/index.d.ts +20 -0
- package/dist/storage/domains/legacy-evals/index.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +90 -0
- package/dist/storage/domains/memory/index.d.ts.map +1 -0
- package/dist/storage/domains/operations/index.d.ts +72 -0
- package/dist/storage/domains/operations/index.d.ts.map +1 -0
- package/dist/storage/domains/scores/index.d.ts +60 -0
- package/dist/storage/domains/scores/index.d.ts.map +1 -0
- package/dist/storage/domains/traces/index.d.ts +18 -0
- package/dist/storage/domains/traces/index.d.ts.map +1 -0
- package/dist/storage/domains/utils.d.ts +3 -0
- package/dist/storage/domains/utils.d.ts.map +1 -0
- package/dist/storage/domains/workflows/index.d.ts +52 -0
- package/dist/storage/domains/workflows/index.d.ts.map +1 -0
- package/dist/storage/index.d.ts +295 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/sql-builder.d.ts +128 -0
- package/dist/storage/sql-builder.d.ts.map +1 -0
- package/dist/storage/test-utils.d.ts +19 -0
- package/dist/storage/test-utils.d.ts.map +1 -0
- package/package.json +25 -14
- package/dist/_tsup-dts-rollup.d.cts +0 -422
- package/dist/_tsup-dts-rollup.d.ts +0 -422
- package/dist/index.d.cts +0 -7
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
import { default as Cloudflare_2 } from 'cloudflare';
|
|
2
|
-
import type { D1Database as D1Database_2 } from '@cloudflare/workers-types';
|
|
3
|
-
import type { EvalRow } from '@mastra/core/storage';
|
|
4
|
-
import type { MastraMessageContentV2 } from '@mastra/core/agent';
|
|
5
|
-
import type { MastraMessageV1 } from '@mastra/core/memory';
|
|
6
|
-
import type { MastraMessageV2 } from '@mastra/core/memory';
|
|
7
|
-
import { MastraStorage } from '@mastra/core/storage';
|
|
8
|
-
import type { PaginationInfo } from '@mastra/core/storage';
|
|
9
|
-
import type { StorageColumn } from '@mastra/core/storage';
|
|
10
|
-
import type { StorageGetMessagesArg } from '@mastra/core/storage';
|
|
11
|
-
import type { StorageThreadType } from '@mastra/core/memory';
|
|
12
|
-
import type { TABLE_NAMES } from '@mastra/core/storage';
|
|
13
|
-
import type { Trace } from '@mastra/core/telemetry';
|
|
14
|
-
import type { WorkflowRun } from '@mastra/core/storage';
|
|
15
|
-
import type { WorkflowRuns } from '@mastra/core/storage';
|
|
16
|
-
import type { WorkflowRunState } from '@mastra/core/workflows';
|
|
17
|
-
|
|
18
|
-
export declare const createSampleTrace: (name: string, scope?: string, attributes?: Record<string, string>) => {
|
|
19
|
-
id: string;
|
|
20
|
-
parentSpanId: string;
|
|
21
|
-
traceId: string;
|
|
22
|
-
name: string;
|
|
23
|
-
scope: string | undefined;
|
|
24
|
-
kind: string;
|
|
25
|
-
status: string;
|
|
26
|
-
events: string;
|
|
27
|
-
links: string;
|
|
28
|
-
attributes: string | undefined;
|
|
29
|
-
startTime: string;
|
|
30
|
-
endTime: string;
|
|
31
|
-
other: string;
|
|
32
|
-
createdAt: string;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export declare function createSqlBuilder(): SqlBuilder;
|
|
36
|
-
|
|
37
|
-
declare interface D1Client {
|
|
38
|
-
query(args: {
|
|
39
|
-
sql: string;
|
|
40
|
-
params: string[];
|
|
41
|
-
}): Promise<{
|
|
42
|
-
result: D1QueryResult;
|
|
43
|
-
}>;
|
|
44
|
-
}
|
|
45
|
-
export { D1Client }
|
|
46
|
-
export { D1Client as D1Client_alias_1 }
|
|
47
|
-
|
|
48
|
-
declare interface D1ClientConfig {
|
|
49
|
-
/** Optional prefix for table names */
|
|
50
|
-
tablePrefix?: string;
|
|
51
|
-
/** D1 Client */
|
|
52
|
-
client: D1Client;
|
|
53
|
-
}
|
|
54
|
-
export { D1ClientConfig }
|
|
55
|
-
export { D1ClientConfig as D1ClientConfig_alias_1 }
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Configuration for D1 using the REST API
|
|
59
|
-
*/
|
|
60
|
-
declare interface D1Config {
|
|
61
|
-
/** Cloudflare account ID */
|
|
62
|
-
accountId: string;
|
|
63
|
-
/** Cloudflare API token with D1 access */
|
|
64
|
-
apiToken: string;
|
|
65
|
-
/** D1 database ID */
|
|
66
|
-
databaseId: string;
|
|
67
|
-
/** Optional prefix for table names */
|
|
68
|
-
tablePrefix?: string;
|
|
69
|
-
}
|
|
70
|
-
export { D1Config }
|
|
71
|
-
export { D1Config as D1Config_alias_1 }
|
|
72
|
-
|
|
73
|
-
declare type D1QueryResult = Awaited<ReturnType<Cloudflare_2['d1']['database']['query']>>['result'];
|
|
74
|
-
export { D1QueryResult }
|
|
75
|
-
export { D1QueryResult as D1QueryResult_alias_1 }
|
|
76
|
-
|
|
77
|
-
declare class D1Store extends MastraStorage {
|
|
78
|
-
private client?;
|
|
79
|
-
private binding?;
|
|
80
|
-
private tablePrefix;
|
|
81
|
-
/**
|
|
82
|
-
* Creates a new D1Store instance
|
|
83
|
-
* @param config Configuration for D1 access (either REST API or Workers Binding API)
|
|
84
|
-
*/
|
|
85
|
-
constructor(config: D1StoreConfig);
|
|
86
|
-
private getTableName;
|
|
87
|
-
private formatSqlParams;
|
|
88
|
-
private executeWorkersBindingQuery;
|
|
89
|
-
private executeRestQuery;
|
|
90
|
-
/**
|
|
91
|
-
* Execute a SQL query against the D1 database
|
|
92
|
-
* @param options Query options including SQL, parameters, and whether to return only the first result
|
|
93
|
-
* @returns Query results as an array or a single object if first=true
|
|
94
|
-
*/
|
|
95
|
-
private executeQuery;
|
|
96
|
-
private getTableColumns;
|
|
97
|
-
private serializeValue;
|
|
98
|
-
private deserializeValue;
|
|
99
|
-
protected getSqlType(type: StorageColumn['type']): string;
|
|
100
|
-
createTable({ tableName, schema, }: {
|
|
101
|
-
tableName: TABLE_NAMES;
|
|
102
|
-
schema: Record<string, StorageColumn>;
|
|
103
|
-
}): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Alters table schema to add columns if they don't exist
|
|
106
|
-
* @param tableName Name of the table
|
|
107
|
-
* @param schema Schema of the table
|
|
108
|
-
* @param ifNotExists Array of column names to add if they don't exist
|
|
109
|
-
*/
|
|
110
|
-
alterTable({ tableName, schema, ifNotExists, }: {
|
|
111
|
-
tableName: TABLE_NAMES;
|
|
112
|
-
schema: Record<string, StorageColumn>;
|
|
113
|
-
ifNotExists: string[];
|
|
114
|
-
}): Promise<void>;
|
|
115
|
-
clearTable({ tableName }: {
|
|
116
|
-
tableName: TABLE_NAMES;
|
|
117
|
-
}): Promise<void>;
|
|
118
|
-
private processRecord;
|
|
119
|
-
insert({ tableName, record }: {
|
|
120
|
-
tableName: TABLE_NAMES;
|
|
121
|
-
record: Record<string, any>;
|
|
122
|
-
}): Promise<void>;
|
|
123
|
-
load<R>({ tableName, keys }: {
|
|
124
|
-
tableName: TABLE_NAMES;
|
|
125
|
-
keys: Record<string, string>;
|
|
126
|
-
}): Promise<R | null>;
|
|
127
|
-
getThreadById({ threadId }: {
|
|
128
|
-
threadId: string;
|
|
129
|
-
}): Promise<StorageThreadType | null>;
|
|
130
|
-
/**
|
|
131
|
-
* @deprecated use getThreadsByResourceIdPaginated instead
|
|
132
|
-
*/
|
|
133
|
-
getThreadsByResourceId({ resourceId }: {
|
|
134
|
-
resourceId: string;
|
|
135
|
-
}): Promise<StorageThreadType[]>;
|
|
136
|
-
getThreadsByResourceIdPaginated(args: {
|
|
137
|
-
resourceId: string;
|
|
138
|
-
page: number;
|
|
139
|
-
perPage: number;
|
|
140
|
-
}): Promise<PaginationInfo & {
|
|
141
|
-
threads: StorageThreadType[];
|
|
142
|
-
}>;
|
|
143
|
-
saveThread({ thread }: {
|
|
144
|
-
thread: StorageThreadType;
|
|
145
|
-
}): Promise<StorageThreadType>;
|
|
146
|
-
updateThread({ id, title, metadata, }: {
|
|
147
|
-
id: string;
|
|
148
|
-
title: string;
|
|
149
|
-
metadata: Record<string, unknown>;
|
|
150
|
-
}): Promise<StorageThreadType>;
|
|
151
|
-
deleteThread({ threadId }: {
|
|
152
|
-
threadId: string;
|
|
153
|
-
}): Promise<void>;
|
|
154
|
-
saveMessages(args: {
|
|
155
|
-
messages: MastraMessageV1[];
|
|
156
|
-
format?: undefined | 'v1';
|
|
157
|
-
}): Promise<MastraMessageV1[]>;
|
|
158
|
-
saveMessages(args: {
|
|
159
|
-
messages: MastraMessageV2[];
|
|
160
|
-
format: 'v2';
|
|
161
|
-
}): Promise<MastraMessageV2[]>;
|
|
162
|
-
private _getIncludedMessages;
|
|
163
|
-
/**
|
|
164
|
-
* @deprecated use getMessagesPaginated instead
|
|
165
|
-
*/
|
|
166
|
-
getMessages(args: StorageGetMessagesArg & {
|
|
167
|
-
format?: 'v1';
|
|
168
|
-
}): Promise<MastraMessageV1[]>;
|
|
169
|
-
getMessages(args: StorageGetMessagesArg & {
|
|
170
|
-
format: 'v2';
|
|
171
|
-
}): Promise<MastraMessageV2[]>;
|
|
172
|
-
getMessagesPaginated({ threadId, selectBy, format, }: StorageGetMessagesArg & {
|
|
173
|
-
format?: 'v1' | 'v2';
|
|
174
|
-
}): Promise<PaginationInfo & {
|
|
175
|
-
messages: MastraMessageV1[] | MastraMessageV2[];
|
|
176
|
-
}>;
|
|
177
|
-
persistWorkflowSnapshot({ workflowName, runId, snapshot, }: {
|
|
178
|
-
workflowName: string;
|
|
179
|
-
runId: string;
|
|
180
|
-
snapshot: WorkflowRunState;
|
|
181
|
-
}): Promise<void>;
|
|
182
|
-
loadWorkflowSnapshot(params: {
|
|
183
|
-
workflowName: string;
|
|
184
|
-
runId: string;
|
|
185
|
-
}): Promise<WorkflowRunState | null>;
|
|
186
|
-
/**
|
|
187
|
-
* Insert multiple records in a batch operation
|
|
188
|
-
* @param tableName The table to insert into
|
|
189
|
-
* @param records The records to insert
|
|
190
|
-
*/
|
|
191
|
-
batchInsert({ tableName, records }: {
|
|
192
|
-
tableName: TABLE_NAMES;
|
|
193
|
-
records: Record<string, any>[];
|
|
194
|
-
}): Promise<void>;
|
|
195
|
-
/**
|
|
196
|
-
* Upsert multiple records in a batch operation
|
|
197
|
-
* @param tableName The table to insert into
|
|
198
|
-
* @param records The records to insert
|
|
199
|
-
*/
|
|
200
|
-
private batchUpsert;
|
|
201
|
-
/**
|
|
202
|
-
* @deprecated use getTracesPaginated instead
|
|
203
|
-
*/
|
|
204
|
-
getTraces({ name, scope, page, perPage, attributes, fromDate, toDate, }: {
|
|
205
|
-
name?: string;
|
|
206
|
-
scope?: string;
|
|
207
|
-
page: number;
|
|
208
|
-
perPage: number;
|
|
209
|
-
attributes?: Record<string, string>;
|
|
210
|
-
fromDate?: Date;
|
|
211
|
-
toDate?: Date;
|
|
212
|
-
}): Promise<Trace[]>;
|
|
213
|
-
getTracesPaginated(args: {
|
|
214
|
-
name?: string;
|
|
215
|
-
scope?: string;
|
|
216
|
-
attributes?: Record<string, string>;
|
|
217
|
-
page: number;
|
|
218
|
-
perPage: number;
|
|
219
|
-
fromDate?: Date;
|
|
220
|
-
toDate?: Date;
|
|
221
|
-
}): Promise<PaginationInfo & {
|
|
222
|
-
traces: Trace[];
|
|
223
|
-
}>;
|
|
224
|
-
/**
|
|
225
|
-
* @deprecated use getEvals instead
|
|
226
|
-
*/
|
|
227
|
-
getEvalsByAgentName(agentName: string, type?: 'test' | 'live'): Promise<EvalRow[]>;
|
|
228
|
-
getEvals(options?: {
|
|
229
|
-
agentName?: string;
|
|
230
|
-
type?: 'test' | 'live';
|
|
231
|
-
page?: number;
|
|
232
|
-
perPage?: number;
|
|
233
|
-
fromDate?: Date;
|
|
234
|
-
toDate?: Date;
|
|
235
|
-
}): Promise<PaginationInfo & {
|
|
236
|
-
evals: EvalRow[];
|
|
237
|
-
}>;
|
|
238
|
-
private parseWorkflowRun;
|
|
239
|
-
private hasColumn;
|
|
240
|
-
getWorkflowRuns({ workflowName, fromDate, toDate, limit, offset, resourceId, }?: {
|
|
241
|
-
workflowName?: string;
|
|
242
|
-
fromDate?: Date;
|
|
243
|
-
toDate?: Date;
|
|
244
|
-
limit?: number;
|
|
245
|
-
offset?: number;
|
|
246
|
-
resourceId?: string;
|
|
247
|
-
}): Promise<WorkflowRuns>;
|
|
248
|
-
getWorkflowRunById({ runId, workflowName, }: {
|
|
249
|
-
runId: string;
|
|
250
|
-
workflowName?: string;
|
|
251
|
-
}): Promise<WorkflowRun | null>;
|
|
252
|
-
/**
|
|
253
|
-
* Close the database connection
|
|
254
|
-
* No explicit cleanup needed for D1 in either REST or Workers Binding mode
|
|
255
|
-
*/
|
|
256
|
-
close(): Promise<void>;
|
|
257
|
-
updateMessages(_args: {
|
|
258
|
-
messages: Partial<Omit<MastraMessageV2, 'createdAt'>> & {
|
|
259
|
-
id: string;
|
|
260
|
-
content?: {
|
|
261
|
-
metadata?: MastraMessageContentV2['metadata'];
|
|
262
|
-
content?: MastraMessageContentV2['content'];
|
|
263
|
-
};
|
|
264
|
-
}[];
|
|
265
|
-
}): Promise<MastraMessageV2[]>;
|
|
266
|
-
}
|
|
267
|
-
export { D1Store }
|
|
268
|
-
export { D1Store as D1Store_alias_1 }
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Combined configuration type supporting both REST API and Workers Binding API
|
|
272
|
-
*/
|
|
273
|
-
declare type D1StoreConfig = D1Config | D1WorkersConfig | D1ClientConfig;
|
|
274
|
-
export { D1StoreConfig }
|
|
275
|
-
export { D1StoreConfig as D1StoreConfig_alias_1 }
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Configuration for D1 using the Workers Binding API
|
|
279
|
-
*/
|
|
280
|
-
declare interface D1WorkersConfig {
|
|
281
|
-
/** D1 database binding from Workers environment */
|
|
282
|
-
binding: D1Database_2;
|
|
283
|
-
/** Optional prefix for table names */
|
|
284
|
-
tablePrefix?: string;
|
|
285
|
-
}
|
|
286
|
-
export { D1WorkersConfig }
|
|
287
|
-
export { D1WorkersConfig as D1WorkersConfig_alias_1 }
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Parses and returns a valid SQL SELECT column identifier.
|
|
291
|
-
* Allows a single identifier (letters, numbers, underscores), or '*', optionally with 'AS alias'.
|
|
292
|
-
*
|
|
293
|
-
* @param column - The column identifier string to parse.
|
|
294
|
-
* @returns The validated column identifier as a branded type.
|
|
295
|
-
* @throws {Error} If invalid.
|
|
296
|
-
*
|
|
297
|
-
* @example
|
|
298
|
-
* const col = parseSelectIdentifier('user_id'); // Ok
|
|
299
|
-
* parseSelectIdentifier('user_id AS uid'); // Ok
|
|
300
|
-
* parseSelectIdentifier('*'); // Ok
|
|
301
|
-
* parseSelectIdentifier('user id'); // Throws error
|
|
302
|
-
*/
|
|
303
|
-
export declare function parseSelectIdentifier(column: string): SelectIdentifier;
|
|
304
|
-
|
|
305
|
-
export declare const retryUntil: <T>(fn: () => Promise<T>, condition: (result: T) => boolean, timeout?: number, // REST API needs longer timeout due to higher latency
|
|
306
|
-
interval?: number) => Promise<T>;
|
|
307
|
-
|
|
308
|
-
/** Represents a validated SQL SELECT column identifier (or '*', optionally with 'AS alias'). */
|
|
309
|
-
declare type SelectIdentifier = string & {
|
|
310
|
-
__brand: 'SelectIdentifier';
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* SQL Builder class for constructing type-safe SQL queries
|
|
315
|
-
* This helps create maintainable and secure SQL queries with proper parameter handling
|
|
316
|
-
*/
|
|
317
|
-
export declare class SqlBuilder {
|
|
318
|
-
private sql;
|
|
319
|
-
private params;
|
|
320
|
-
private whereAdded;
|
|
321
|
-
select(columns?: string | string[]): SqlBuilder;
|
|
322
|
-
from(table: string): SqlBuilder;
|
|
323
|
-
/**
|
|
324
|
-
* Add a WHERE clause to the query
|
|
325
|
-
* @param condition The condition to add
|
|
326
|
-
* @param params Parameters to bind to the condition
|
|
327
|
-
*/
|
|
328
|
-
where(condition: string, ...params: SqlParam[]): SqlBuilder;
|
|
329
|
-
/**
|
|
330
|
-
* Add a WHERE clause if it hasn't been added yet, otherwise add an AND clause
|
|
331
|
-
* @param condition The condition to add
|
|
332
|
-
* @param params Parameters to bind to the condition
|
|
333
|
-
*/
|
|
334
|
-
whereAnd(condition: string, ...params: SqlParam[]): SqlBuilder;
|
|
335
|
-
andWhere(condition: string, ...params: SqlParam[]): SqlBuilder;
|
|
336
|
-
orWhere(condition: string, ...params: SqlParam[]): SqlBuilder;
|
|
337
|
-
orderBy(column: string, direction?: 'ASC' | 'DESC'): SqlBuilder;
|
|
338
|
-
limit(count: number): SqlBuilder;
|
|
339
|
-
offset(count: number): SqlBuilder;
|
|
340
|
-
count(): SqlBuilder;
|
|
341
|
-
/**
|
|
342
|
-
* Insert a row, or update specific columns on conflict (upsert).
|
|
343
|
-
* @param table Table name
|
|
344
|
-
* @param columns Columns to insert
|
|
345
|
-
* @param values Values to insert
|
|
346
|
-
* @param conflictColumns Columns to check for conflict (usually PK or UNIQUE)
|
|
347
|
-
* @param updateMap Object mapping columns to update to their new value (e.g. { name: 'excluded.name' })
|
|
348
|
-
*/
|
|
349
|
-
insert(table: string, columns: string[], values: SqlParam[], conflictColumns?: string[], updateMap?: Record<string, string>): SqlBuilder;
|
|
350
|
-
update(table: string, columns: string[], values: SqlParam[]): SqlBuilder;
|
|
351
|
-
delete(table: string): SqlBuilder;
|
|
352
|
-
/**
|
|
353
|
-
* Create a table if it doesn't exist
|
|
354
|
-
* @param table The table name
|
|
355
|
-
* @param columnDefinitions The column definitions as an array of strings
|
|
356
|
-
* @param tableConstraints Optional constraints for the table
|
|
357
|
-
* @returns The builder instance
|
|
358
|
-
*/
|
|
359
|
-
createTable(table: string, columnDefinitions: string[], tableConstraints?: string[]): SqlBuilder;
|
|
360
|
-
/**
|
|
361
|
-
* Check if an index exists in the database
|
|
362
|
-
* @param indexName The name of the index to check
|
|
363
|
-
* @param tableName The table the index is on
|
|
364
|
-
* @returns The builder instance
|
|
365
|
-
*/
|
|
366
|
-
checkIndexExists(indexName: string, tableName: string): SqlBuilder;
|
|
367
|
-
/**
|
|
368
|
-
* Create an index if it doesn't exist
|
|
369
|
-
* @param indexName The name of the index to create
|
|
370
|
-
* @param tableName The table to create the index on
|
|
371
|
-
* @param columnName The column to index
|
|
372
|
-
* @param indexType Optional index type (e.g., 'UNIQUE')
|
|
373
|
-
* @returns The builder instance
|
|
374
|
-
*/
|
|
375
|
-
createIndex(indexName: string, tableName: string, columnName: string, indexType?: string): SqlBuilder;
|
|
376
|
-
/**
|
|
377
|
-
* Add a LIKE condition to the query
|
|
378
|
-
* @param column The column to check
|
|
379
|
-
* @param value The value to match (will be wrapped with % for LIKE)
|
|
380
|
-
* @param exact If true, will not add % wildcards
|
|
381
|
-
*/
|
|
382
|
-
like(column: string, value: string, exact?: boolean): SqlBuilder;
|
|
383
|
-
/**
|
|
384
|
-
* Add a JSON LIKE condition for searching in JSON fields
|
|
385
|
-
* @param column The JSON column to search in
|
|
386
|
-
* @param key The JSON key to match
|
|
387
|
-
* @param value The value to match
|
|
388
|
-
*/
|
|
389
|
-
jsonLike(column: string, key: string, value: string): SqlBuilder;
|
|
390
|
-
/**
|
|
391
|
-
* Get the built query
|
|
392
|
-
* @returns Object containing the SQL string and parameters array
|
|
393
|
-
*/
|
|
394
|
-
build(): {
|
|
395
|
-
sql: string;
|
|
396
|
-
params: SqlParam[];
|
|
397
|
-
};
|
|
398
|
-
/**
|
|
399
|
-
* Reset the builder for reuse
|
|
400
|
-
* @returns The reset builder instance
|
|
401
|
-
*/
|
|
402
|
-
reset(): SqlBuilder;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Type definition for SQL query parameters
|
|
407
|
-
*/
|
|
408
|
-
export declare type SqlParam = string | number | boolean | null | undefined;
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Interface for SQL query options with generic type support
|
|
412
|
-
*/
|
|
413
|
-
export declare interface SqlQueryOptions {
|
|
414
|
-
/** SQL query to execute */
|
|
415
|
-
sql: string;
|
|
416
|
-
/** Parameters to bind to the query */
|
|
417
|
-
params?: SqlParam[];
|
|
418
|
-
/** Whether to return only the first result */
|
|
419
|
-
first?: boolean;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
export { }
|
package/dist/index.d.cts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { D1Config } from './_tsup-dts-rollup.cjs';
|
|
2
|
-
export { D1ClientConfig } from './_tsup-dts-rollup.cjs';
|
|
3
|
-
export { D1WorkersConfig } from './_tsup-dts-rollup.cjs';
|
|
4
|
-
export { D1StoreConfig } from './_tsup-dts-rollup.cjs';
|
|
5
|
-
export { D1QueryResult } from './_tsup-dts-rollup.cjs';
|
|
6
|
-
export { D1Client } from './_tsup-dts-rollup.cjs';
|
|
7
|
-
export { D1Store } from './_tsup-dts-rollup.cjs';
|