Initial commit
This commit is contained in:
50
node_modules/drizzle-orm/prisma/sqlite/driver.cjs
generated
vendored
Normal file
50
node_modules/drizzle-orm/prisma/sqlite/driver.cjs
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var driver_exports = {};
|
||||
__export(driver_exports, {
|
||||
drizzle: () => drizzle
|
||||
});
|
||||
module.exports = __toCommonJS(driver_exports);
|
||||
var import_client = require("@prisma/client");
|
||||
var import_logger = require("../../logger.cjs");
|
||||
var import_sqlite_core = require("../../sqlite-core/index.cjs");
|
||||
var import_session = require("./session.cjs");
|
||||
function drizzle(config = {}) {
|
||||
const dialect = new import_sqlite_core.SQLiteAsyncDialect();
|
||||
let logger;
|
||||
if (config.logger === true) {
|
||||
logger = new import_logger.DefaultLogger();
|
||||
} else if (config.logger !== false) {
|
||||
logger = config.logger;
|
||||
}
|
||||
return import_client.Prisma.defineExtension((client) => {
|
||||
const session = new import_session.PrismaSQLiteSession(client, dialect, { logger });
|
||||
return client.$extends({
|
||||
name: "drizzle",
|
||||
client: {
|
||||
$drizzle: new import_sqlite_core.BaseSQLiteDatabase("async", dialect, session, void 0)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
drizzle
|
||||
});
|
||||
//# sourceMappingURL=driver.cjs.map
|
||||
1
node_modules/drizzle-orm/prisma/sqlite/driver.cjs.map
generated
vendored
Normal file
1
node_modules/drizzle-orm/prisma/sqlite/driver.cjs.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/prisma/sqlite/driver.ts"],"sourcesContent":["import { Prisma } from '@prisma/client';\n\nimport type { Logger } from '~/logger.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport { BaseSQLiteDatabase, SQLiteAsyncDialect } from '~/sqlite-core/index.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport { PrismaSQLiteSession } from './session.ts';\n\nexport type PrismaSQLiteDatabase = BaseSQLiteDatabase<'async', []>;\n\nexport type PrismaSQLiteConfig = Omit<DrizzleConfig, 'schema'>;\n\nexport function drizzle(config: PrismaSQLiteConfig = {}) {\n\tconst dialect = new SQLiteAsyncDialect();\n\tlet logger: Logger | undefined;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\treturn Prisma.defineExtension((client) => {\n\t\tconst session = new PrismaSQLiteSession(client, dialect, { logger });\n\n\t\treturn client.$extends({\n\t\t\tname: 'drizzle',\n\t\t\tclient: {\n\t\t\t\t$drizzle: new BaseSQLiteDatabase('async', dialect, session, undefined) as PrismaSQLiteDatabase,\n\t\t\t},\n\t\t});\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAGvB,oBAA8B;AAC9B,yBAAuD;AAEvD,qBAAoC;AAM7B,SAAS,QAAQ,SAA6B,CAAC,GAAG;AACxD,QAAM,UAAU,IAAI,sCAAmB;AACvC,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,4BAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,SAAO,qBAAO,gBAAgB,CAAC,WAAW;AACzC,UAAM,UAAU,IAAI,mCAAoB,QAAQ,SAAS,EAAE,OAAO,CAAC;AAEnE,WAAO,OAAO,SAAS;AAAA,MACtB,MAAM;AAAA,MACN,QAAQ;AAAA,QACP,UAAU,IAAI,sCAAmB,SAAS,SAAS,SAAS,MAAS;AAAA,MACtE;AAAA,IACD,CAAC;AAAA,EACF,CAAC;AACF;","names":[]}
|
||||
16
node_modules/drizzle-orm/prisma/sqlite/driver.d.cts
generated
vendored
Normal file
16
node_modules/drizzle-orm/prisma/sqlite/driver.d.cts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import { BaseSQLiteDatabase } from "../../sqlite-core/index.cjs";
|
||||
import type { DrizzleConfig } from "../../utils.cjs";
|
||||
export type PrismaSQLiteDatabase = BaseSQLiteDatabase<'async', []>;
|
||||
export type PrismaSQLiteConfig = Omit<DrizzleConfig, 'schema'>;
|
||||
export declare function drizzle(config?: PrismaSQLiteConfig): (client: any) => {
|
||||
$extends: {
|
||||
extArgs: {
|
||||
result: {};
|
||||
model: {};
|
||||
query: {};
|
||||
client: {
|
||||
$drizzle: () => PrismaSQLiteDatabase;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
16
node_modules/drizzle-orm/prisma/sqlite/driver.d.ts
generated
vendored
Normal file
16
node_modules/drizzle-orm/prisma/sqlite/driver.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import { BaseSQLiteDatabase } from "../../sqlite-core/index.js";
|
||||
import type { DrizzleConfig } from "../../utils.js";
|
||||
export type PrismaSQLiteDatabase = BaseSQLiteDatabase<'async', []>;
|
||||
export type PrismaSQLiteConfig = Omit<DrizzleConfig, 'schema'>;
|
||||
export declare function drizzle(config?: PrismaSQLiteConfig): (client: any) => {
|
||||
$extends: {
|
||||
extArgs: {
|
||||
result: {};
|
||||
model: {};
|
||||
query: {};
|
||||
client: {
|
||||
$drizzle: () => PrismaSQLiteDatabase;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
26
node_modules/drizzle-orm/prisma/sqlite/driver.js
generated
vendored
Normal file
26
node_modules/drizzle-orm/prisma/sqlite/driver.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { DefaultLogger } from "../../logger.js";
|
||||
import { BaseSQLiteDatabase, SQLiteAsyncDialect } from "../../sqlite-core/index.js";
|
||||
import { PrismaSQLiteSession } from "./session.js";
|
||||
function drizzle(config = {}) {
|
||||
const dialect = new SQLiteAsyncDialect();
|
||||
let logger;
|
||||
if (config.logger === true) {
|
||||
logger = new DefaultLogger();
|
||||
} else if (config.logger !== false) {
|
||||
logger = config.logger;
|
||||
}
|
||||
return Prisma.defineExtension((client) => {
|
||||
const session = new PrismaSQLiteSession(client, dialect, { logger });
|
||||
return client.$extends({
|
||||
name: "drizzle",
|
||||
client: {
|
||||
$drizzle: new BaseSQLiteDatabase("async", dialect, session, void 0)
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
export {
|
||||
drizzle
|
||||
};
|
||||
//# sourceMappingURL=driver.js.map
|
||||
1
node_modules/drizzle-orm/prisma/sqlite/driver.js.map
generated
vendored
Normal file
1
node_modules/drizzle-orm/prisma/sqlite/driver.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/prisma/sqlite/driver.ts"],"sourcesContent":["import { Prisma } from '@prisma/client';\n\nimport type { Logger } from '~/logger.ts';\nimport { DefaultLogger } from '~/logger.ts';\nimport { BaseSQLiteDatabase, SQLiteAsyncDialect } from '~/sqlite-core/index.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport { PrismaSQLiteSession } from './session.ts';\n\nexport type PrismaSQLiteDatabase = BaseSQLiteDatabase<'async', []>;\n\nexport type PrismaSQLiteConfig = Omit<DrizzleConfig, 'schema'>;\n\nexport function drizzle(config: PrismaSQLiteConfig = {}) {\n\tconst dialect = new SQLiteAsyncDialect();\n\tlet logger: Logger | undefined;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\treturn Prisma.defineExtension((client) => {\n\t\tconst session = new PrismaSQLiteSession(client, dialect, { logger });\n\n\t\treturn client.$extends({\n\t\t\tname: 'drizzle',\n\t\t\tclient: {\n\t\t\t\t$drizzle: new BaseSQLiteDatabase('async', dialect, session, undefined) as PrismaSQLiteDatabase,\n\t\t\t},\n\t\t});\n\t});\n}\n"],"mappings":"AAAA,SAAS,cAAc;AAGvB,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB,0BAA0B;AAEvD,SAAS,2BAA2B;AAM7B,SAAS,QAAQ,SAA6B,CAAC,GAAG;AACxD,QAAM,UAAU,IAAI,mBAAmB;AACvC,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,cAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,SAAO,OAAO,gBAAgB,CAAC,WAAW;AACzC,UAAM,UAAU,IAAI,oBAAoB,QAAQ,SAAS,EAAE,OAAO,CAAC;AAEnE,WAAO,OAAO,SAAS;AAAA,MACtB,MAAM;AAAA,MACN,QAAQ;AAAA,QACP,UAAU,IAAI,mBAAmB,SAAS,SAAS,SAAS,MAAS;AAAA,MACtE;AAAA,IACD,CAAC;AAAA,EACF,CAAC;AACF;","names":[]}
|
||||
25
node_modules/drizzle-orm/prisma/sqlite/index.cjs
generated
vendored
Normal file
25
node_modules/drizzle-orm/prisma/sqlite/index.cjs
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var sqlite_exports = {};
|
||||
module.exports = __toCommonJS(sqlite_exports);
|
||||
__reExport(sqlite_exports, require("./driver.cjs"), module.exports);
|
||||
__reExport(sqlite_exports, require("./session.cjs"), module.exports);
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
...require("./driver.cjs"),
|
||||
...require("./session.cjs")
|
||||
});
|
||||
//# sourceMappingURL=index.cjs.map
|
||||
1
node_modules/drizzle-orm/prisma/sqlite/index.cjs.map
generated
vendored
Normal file
1
node_modules/drizzle-orm/prisma/sqlite/index.cjs.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/prisma/sqlite/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAc,wBAAd;AACA,2BAAc,yBADd;","names":[]}
|
||||
2
node_modules/drizzle-orm/prisma/sqlite/index.d.cts
generated
vendored
Normal file
2
node_modules/drizzle-orm/prisma/sqlite/index.d.cts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export * from "./driver.cjs";
|
||||
export * from "./session.cjs";
|
||||
2
node_modules/drizzle-orm/prisma/sqlite/index.d.ts
generated
vendored
Normal file
2
node_modules/drizzle-orm/prisma/sqlite/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export * from "./driver.js";
|
||||
export * from "./session.js";
|
||||
3
node_modules/drizzle-orm/prisma/sqlite/index.js
generated
vendored
Normal file
3
node_modules/drizzle-orm/prisma/sqlite/index.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export * from "./driver.js";
|
||||
export * from "./session.js";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/drizzle-orm/prisma/sqlite/index.js.map
generated
vendored
Normal file
1
node_modules/drizzle-orm/prisma/sqlite/index.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/prisma/sqlite/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
||||
76
node_modules/drizzle-orm/prisma/sqlite/session.cjs
generated
vendored
Normal file
76
node_modules/drizzle-orm/prisma/sqlite/session.cjs
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
"use strict";
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
var session_exports = {};
|
||||
__export(session_exports, {
|
||||
PrismaSQLitePreparedQuery: () => PrismaSQLitePreparedQuery,
|
||||
PrismaSQLiteSession: () => PrismaSQLiteSession
|
||||
});
|
||||
module.exports = __toCommonJS(session_exports);
|
||||
var import_entity = require("../../entity.cjs");
|
||||
var import_logger = require("../../logger.cjs");
|
||||
var import_sql = require("../../sql/sql.cjs");
|
||||
var import_sqlite_core = require("../../sqlite-core/index.cjs");
|
||||
class PrismaSQLitePreparedQuery extends import_sqlite_core.SQLitePreparedQuery {
|
||||
constructor(prisma, query, logger, executeMethod) {
|
||||
super("async", executeMethod, query);
|
||||
this.prisma = prisma;
|
||||
this.logger = logger;
|
||||
}
|
||||
static [import_entity.entityKind] = "PrismaSQLitePreparedQuery";
|
||||
all(placeholderValues) {
|
||||
const params = (0, import_sql.fillPlaceholders)(this.query.params, placeholderValues ?? {});
|
||||
this.logger.logQuery(this.query.sql, params);
|
||||
return this.prisma.$queryRawUnsafe(this.query.sql, ...params);
|
||||
}
|
||||
async run(placeholderValues) {
|
||||
await this.all(placeholderValues);
|
||||
return [];
|
||||
}
|
||||
async get(placeholderValues) {
|
||||
const all = await this.all(placeholderValues);
|
||||
return all[0];
|
||||
}
|
||||
values(_placeholderValues) {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
isResponseInArrayMode() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
class PrismaSQLiteSession extends import_sqlite_core.SQLiteSession {
|
||||
constructor(prisma, dialect, options) {
|
||||
super(dialect);
|
||||
this.prisma = prisma;
|
||||
this.logger = options.logger ?? new import_logger.NoopLogger();
|
||||
}
|
||||
static [import_entity.entityKind] = "PrismaSQLiteSession";
|
||||
logger;
|
||||
prepareQuery(query, fields, executeMethod) {
|
||||
return new PrismaSQLitePreparedQuery(this.prisma, query, this.logger, executeMethod);
|
||||
}
|
||||
transaction(_transaction, _config) {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
PrismaSQLitePreparedQuery,
|
||||
PrismaSQLiteSession
|
||||
});
|
||||
//# sourceMappingURL=session.cjs.map
|
||||
1
node_modules/drizzle-orm/prisma/sqlite/session.cjs.map
generated
vendored
Normal file
1
node_modules/drizzle-orm/prisma/sqlite/session.cjs.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/prisma/sqlite/session.ts"],"sourcesContent":["import type { PrismaClient } from '@prisma/client/extension';\n\nimport { entityKind } from '~/entity.ts';\nimport { type Logger, NoopLogger } from '~/logger.ts';\nimport type { Query } from '~/sql/sql.ts';\nimport { fillPlaceholders } from '~/sql/sql.ts';\nimport type {\n\tPreparedQueryConfig as PreparedQueryConfigBase,\n\tSelectedFieldsOrdered,\n\tSQLiteAsyncDialect,\n\tSQLiteExecuteMethod,\n\tSQLiteTransaction,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/index.ts';\nimport { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/index.ts';\n\ntype PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;\n\nexport class PrismaSQLitePreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends SQLitePreparedQuery<\n\t{ type: 'async'; run: []; all: T['all']; get: T['get']; values: never; execute: T['execute'] }\n> {\n\tstatic override readonly [entityKind]: string = 'PrismaSQLitePreparedQuery';\n\n\tconstructor(\n\t\tprivate readonly prisma: PrismaClient,\n\t\tquery: Query,\n\t\tprivate readonly logger: Logger,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t) {\n\t\tsuper('async', executeMethod, query);\n\t}\n\n\toverride all(placeholderValues?: Record<string, unknown>): Promise<T['all']> {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn this.prisma.$queryRawUnsafe(this.query.sql, ...params);\n\t}\n\n\toverride async run(placeholderValues?: Record<string, unknown> | undefined): Promise<[]> {\n\t\tawait this.all(placeholderValues);\n\t\treturn [];\n\t}\n\n\toverride async get(placeholderValues?: Record<string, unknown> | undefined): Promise<T['get']> {\n\t\tconst all = await this.all(placeholderValues) as unknown[];\n\t\treturn all[0];\n\t}\n\n\toverride values(_placeholderValues?: Record<string, unknown> | undefined): Promise<never> {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\n\toverride isResponseInArrayMode(): boolean {\n\t\treturn false;\n\t}\n}\n\nexport interface PrismaSQLiteSessionOptions {\n\tlogger?: Logger;\n}\n\nexport class PrismaSQLiteSession extends SQLiteSession<'async', unknown, Record<string, never>, Record<string, never>> {\n\tstatic override readonly [entityKind]: string = 'PrismaSQLiteSession';\n\n\tprivate readonly logger: Logger;\n\n\tconstructor(\n\t\tprivate readonly prisma: PrismaClient,\n\t\tdialect: SQLiteAsyncDialect,\n\t\toptions: PrismaSQLiteSessionOptions,\n\t) {\n\t\tsuper(dialect);\n\t\tthis.logger = options.logger ?? new NoopLogger();\n\t}\n\n\toverride prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t): PrismaSQLitePreparedQuery<T> {\n\t\treturn new PrismaSQLitePreparedQuery(this.prisma, query, this.logger, executeMethod);\n\t}\n\n\toverride transaction<T>(\n\t\t_transaction: (tx: SQLiteTransaction<'async', unknown, Record<string, never>, Record<string, never>>) => Promise<T>,\n\t\t_config?: SQLiteTransactionConfig,\n\t): Promise<T> {\n\t\tthrow new Error('Method not implemented.');\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAC3B,oBAAwC;AAExC,iBAAiC;AASjC,yBAAmD;AAI5C,MAAM,kCAAuF,uCAElG;AAAA,EAGD,YACkB,QACjB,OACiB,QACjB,eACC;AACD,UAAM,SAAS,eAAe,KAAK;AALlB;AAEA;AAAA,EAIlB;AAAA,EATA,QAA0B,wBAAU,IAAY;AAAA,EAWvC,IAAI,mBAAgE;AAC5E,UAAM,aAAS,6BAAiB,KAAK,MAAM,QAAQ,qBAAqB,CAAC,CAAC;AAC1E,SAAK,OAAO,SAAS,KAAK,MAAM,KAAK,MAAM;AAC3C,WAAO,KAAK,OAAO,gBAAgB,KAAK,MAAM,KAAK,GAAG,MAAM;AAAA,EAC7D;AAAA,EAEA,MAAe,IAAI,mBAAsE;AACxF,UAAM,KAAK,IAAI,iBAAiB;AAChC,WAAO,CAAC;AAAA,EACT;AAAA,EAEA,MAAe,IAAI,mBAA4E;AAC9F,UAAM,MAAM,MAAM,KAAK,IAAI,iBAAiB;AAC5C,WAAO,IAAI,CAAC;AAAA,EACb;AAAA,EAES,OAAO,oBAA0E;AACzF,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC1C;AAAA,EAES,wBAAiC;AACzC,WAAO;AAAA,EACR;AACD;AAMO,MAAM,4BAA4B,iCAA8E;AAAA,EAKtH,YACkB,QACjB,SACA,SACC;AACD,UAAM,OAAO;AAJI;AAKjB,SAAK,SAAS,QAAQ,UAAU,IAAI,yBAAW;AAAA,EAChD;AAAA,EAXA,QAA0B,wBAAU,IAAY;AAAA,EAE/B;AAAA,EAWR,aACR,OACA,QACA,eAC+B;AAC/B,WAAO,IAAI,0BAA0B,KAAK,QAAQ,OAAO,KAAK,QAAQ,aAAa;AAAA,EACpF;AAAA,EAES,YACR,cACA,SACa;AACb,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC1C;AACD;","names":[]}
|
||||
37
node_modules/drizzle-orm/prisma/sqlite/session.d.cts
generated
vendored
Normal file
37
node_modules/drizzle-orm/prisma/sqlite/session.d.cts
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
import type { PrismaClient } from '@prisma/client/extension';
|
||||
import { entityKind } from "../../entity.cjs";
|
||||
import { type Logger } from "../../logger.cjs";
|
||||
import type { Query } from "../../sql/sql.cjs";
|
||||
import type { PreparedQueryConfig as PreparedQueryConfigBase, SelectedFieldsOrdered, SQLiteAsyncDialect, SQLiteExecuteMethod, SQLiteTransaction, SQLiteTransactionConfig } from "../../sqlite-core/index.cjs";
|
||||
import { SQLitePreparedQuery, SQLiteSession } from "../../sqlite-core/index.cjs";
|
||||
type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;
|
||||
export declare class PrismaSQLitePreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends SQLitePreparedQuery<{
|
||||
type: 'async';
|
||||
run: [];
|
||||
all: T['all'];
|
||||
get: T['get'];
|
||||
values: never;
|
||||
execute: T['execute'];
|
||||
}> {
|
||||
private readonly prisma;
|
||||
private readonly logger;
|
||||
static readonly [entityKind]: string;
|
||||
constructor(prisma: PrismaClient, query: Query, logger: Logger, executeMethod: SQLiteExecuteMethod);
|
||||
all(placeholderValues?: Record<string, unknown>): Promise<T['all']>;
|
||||
run(placeholderValues?: Record<string, unknown> | undefined): Promise<[]>;
|
||||
get(placeholderValues?: Record<string, unknown> | undefined): Promise<T['get']>;
|
||||
values(_placeholderValues?: Record<string, unknown> | undefined): Promise<never>;
|
||||
isResponseInArrayMode(): boolean;
|
||||
}
|
||||
export interface PrismaSQLiteSessionOptions {
|
||||
logger?: Logger;
|
||||
}
|
||||
export declare class PrismaSQLiteSession extends SQLiteSession<'async', unknown, Record<string, never>, Record<string, never>> {
|
||||
private readonly prisma;
|
||||
static readonly [entityKind]: string;
|
||||
private readonly logger;
|
||||
constructor(prisma: PrismaClient, dialect: SQLiteAsyncDialect, options: PrismaSQLiteSessionOptions);
|
||||
prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod): PrismaSQLitePreparedQuery<T>;
|
||||
transaction<T>(_transaction: (tx: SQLiteTransaction<'async', unknown, Record<string, never>, Record<string, never>>) => Promise<T>, _config?: SQLiteTransactionConfig): Promise<T>;
|
||||
}
|
||||
export {};
|
||||
37
node_modules/drizzle-orm/prisma/sqlite/session.d.ts
generated
vendored
Normal file
37
node_modules/drizzle-orm/prisma/sqlite/session.d.ts
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
import type { PrismaClient } from '@prisma/client/extension';
|
||||
import { entityKind } from "../../entity.js";
|
||||
import { type Logger } from "../../logger.js";
|
||||
import type { Query } from "../../sql/sql.js";
|
||||
import type { PreparedQueryConfig as PreparedQueryConfigBase, SelectedFieldsOrdered, SQLiteAsyncDialect, SQLiteExecuteMethod, SQLiteTransaction, SQLiteTransactionConfig } from "../../sqlite-core/index.js";
|
||||
import { SQLitePreparedQuery, SQLiteSession } from "../../sqlite-core/index.js";
|
||||
type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;
|
||||
export declare class PrismaSQLitePreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends SQLitePreparedQuery<{
|
||||
type: 'async';
|
||||
run: [];
|
||||
all: T['all'];
|
||||
get: T['get'];
|
||||
values: never;
|
||||
execute: T['execute'];
|
||||
}> {
|
||||
private readonly prisma;
|
||||
private readonly logger;
|
||||
static readonly [entityKind]: string;
|
||||
constructor(prisma: PrismaClient, query: Query, logger: Logger, executeMethod: SQLiteExecuteMethod);
|
||||
all(placeholderValues?: Record<string, unknown>): Promise<T['all']>;
|
||||
run(placeholderValues?: Record<string, unknown> | undefined): Promise<[]>;
|
||||
get(placeholderValues?: Record<string, unknown> | undefined): Promise<T['get']>;
|
||||
values(_placeholderValues?: Record<string, unknown> | undefined): Promise<never>;
|
||||
isResponseInArrayMode(): boolean;
|
||||
}
|
||||
export interface PrismaSQLiteSessionOptions {
|
||||
logger?: Logger;
|
||||
}
|
||||
export declare class PrismaSQLiteSession extends SQLiteSession<'async', unknown, Record<string, never>, Record<string, never>> {
|
||||
private readonly prisma;
|
||||
static readonly [entityKind]: string;
|
||||
private readonly logger;
|
||||
constructor(prisma: PrismaClient, dialect: SQLiteAsyncDialect, options: PrismaSQLiteSessionOptions);
|
||||
prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod): PrismaSQLitePreparedQuery<T>;
|
||||
transaction<T>(_transaction: (tx: SQLiteTransaction<'async', unknown, Record<string, never>, Record<string, never>>) => Promise<T>, _config?: SQLiteTransactionConfig): Promise<T>;
|
||||
}
|
||||
export {};
|
||||
51
node_modules/drizzle-orm/prisma/sqlite/session.js
generated
vendored
Normal file
51
node_modules/drizzle-orm/prisma/sqlite/session.js
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
import { entityKind } from "../../entity.js";
|
||||
import { NoopLogger } from "../../logger.js";
|
||||
import { fillPlaceholders } from "../../sql/sql.js";
|
||||
import { SQLitePreparedQuery, SQLiteSession } from "../../sqlite-core/index.js";
|
||||
class PrismaSQLitePreparedQuery extends SQLitePreparedQuery {
|
||||
constructor(prisma, query, logger, executeMethod) {
|
||||
super("async", executeMethod, query);
|
||||
this.prisma = prisma;
|
||||
this.logger = logger;
|
||||
}
|
||||
static [entityKind] = "PrismaSQLitePreparedQuery";
|
||||
all(placeholderValues) {
|
||||
const params = fillPlaceholders(this.query.params, placeholderValues ?? {});
|
||||
this.logger.logQuery(this.query.sql, params);
|
||||
return this.prisma.$queryRawUnsafe(this.query.sql, ...params);
|
||||
}
|
||||
async run(placeholderValues) {
|
||||
await this.all(placeholderValues);
|
||||
return [];
|
||||
}
|
||||
async get(placeholderValues) {
|
||||
const all = await this.all(placeholderValues);
|
||||
return all[0];
|
||||
}
|
||||
values(_placeholderValues) {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
isResponseInArrayMode() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
class PrismaSQLiteSession extends SQLiteSession {
|
||||
constructor(prisma, dialect, options) {
|
||||
super(dialect);
|
||||
this.prisma = prisma;
|
||||
this.logger = options.logger ?? new NoopLogger();
|
||||
}
|
||||
static [entityKind] = "PrismaSQLiteSession";
|
||||
logger;
|
||||
prepareQuery(query, fields, executeMethod) {
|
||||
return new PrismaSQLitePreparedQuery(this.prisma, query, this.logger, executeMethod);
|
||||
}
|
||||
transaction(_transaction, _config) {
|
||||
throw new Error("Method not implemented.");
|
||||
}
|
||||
}
|
||||
export {
|
||||
PrismaSQLitePreparedQuery,
|
||||
PrismaSQLiteSession
|
||||
};
|
||||
//# sourceMappingURL=session.js.map
|
||||
1
node_modules/drizzle-orm/prisma/sqlite/session.js.map
generated
vendored
Normal file
1
node_modules/drizzle-orm/prisma/sqlite/session.js.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/prisma/sqlite/session.ts"],"sourcesContent":["import type { PrismaClient } from '@prisma/client/extension';\n\nimport { entityKind } from '~/entity.ts';\nimport { type Logger, NoopLogger } from '~/logger.ts';\nimport type { Query } from '~/sql/sql.ts';\nimport { fillPlaceholders } from '~/sql/sql.ts';\nimport type {\n\tPreparedQueryConfig as PreparedQueryConfigBase,\n\tSelectedFieldsOrdered,\n\tSQLiteAsyncDialect,\n\tSQLiteExecuteMethod,\n\tSQLiteTransaction,\n\tSQLiteTransactionConfig,\n} from '~/sqlite-core/index.ts';\nimport { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/index.ts';\n\ntype PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;\n\nexport class PrismaSQLitePreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends SQLitePreparedQuery<\n\t{ type: 'async'; run: []; all: T['all']; get: T['get']; values: never; execute: T['execute'] }\n> {\n\tstatic override readonly [entityKind]: string = 'PrismaSQLitePreparedQuery';\n\n\tconstructor(\n\t\tprivate readonly prisma: PrismaClient,\n\t\tquery: Query,\n\t\tprivate readonly logger: Logger,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t) {\n\t\tsuper('async', executeMethod, query);\n\t}\n\n\toverride all(placeholderValues?: Record<string, unknown>): Promise<T['all']> {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn this.prisma.$queryRawUnsafe(this.query.sql, ...params);\n\t}\n\n\toverride async run(placeholderValues?: Record<string, unknown> | undefined): Promise<[]> {\n\t\tawait this.all(placeholderValues);\n\t\treturn [];\n\t}\n\n\toverride async get(placeholderValues?: Record<string, unknown> | undefined): Promise<T['get']> {\n\t\tconst all = await this.all(placeholderValues) as unknown[];\n\t\treturn all[0];\n\t}\n\n\toverride values(_placeholderValues?: Record<string, unknown> | undefined): Promise<never> {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\n\toverride isResponseInArrayMode(): boolean {\n\t\treturn false;\n\t}\n}\n\nexport interface PrismaSQLiteSessionOptions {\n\tlogger?: Logger;\n}\n\nexport class PrismaSQLiteSession extends SQLiteSession<'async', unknown, Record<string, never>, Record<string, never>> {\n\tstatic override readonly [entityKind]: string = 'PrismaSQLiteSession';\n\n\tprivate readonly logger: Logger;\n\n\tconstructor(\n\t\tprivate readonly prisma: PrismaClient,\n\t\tdialect: SQLiteAsyncDialect,\n\t\toptions: PrismaSQLiteSessionOptions,\n\t) {\n\t\tsuper(dialect);\n\t\tthis.logger = options.logger ?? new NoopLogger();\n\t}\n\n\toverride prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(\n\t\tquery: Query,\n\t\tfields: SelectedFieldsOrdered | undefined,\n\t\texecuteMethod: SQLiteExecuteMethod,\n\t): PrismaSQLitePreparedQuery<T> {\n\t\treturn new PrismaSQLitePreparedQuery(this.prisma, query, this.logger, executeMethod);\n\t}\n\n\toverride transaction<T>(\n\t\t_transaction: (tx: SQLiteTransaction<'async', unknown, Record<string, never>, Record<string, never>>) => Promise<T>,\n\t\t_config?: SQLiteTransactionConfig,\n\t): Promise<T> {\n\t\tthrow new Error('Method not implemented.');\n\t}\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAC3B,SAAsB,kBAAkB;AAExC,SAAS,wBAAwB;AASjC,SAAS,qBAAqB,qBAAqB;AAI5C,MAAM,kCAAuF,oBAElG;AAAA,EAGD,YACkB,QACjB,OACiB,QACjB,eACC;AACD,UAAM,SAAS,eAAe,KAAK;AALlB;AAEA;AAAA,EAIlB;AAAA,EATA,QAA0B,UAAU,IAAY;AAAA,EAWvC,IAAI,mBAAgE;AAC5E,UAAM,SAAS,iBAAiB,KAAK,MAAM,QAAQ,qBAAqB,CAAC,CAAC;AAC1E,SAAK,OAAO,SAAS,KAAK,MAAM,KAAK,MAAM;AAC3C,WAAO,KAAK,OAAO,gBAAgB,KAAK,MAAM,KAAK,GAAG,MAAM;AAAA,EAC7D;AAAA,EAEA,MAAe,IAAI,mBAAsE;AACxF,UAAM,KAAK,IAAI,iBAAiB;AAChC,WAAO,CAAC;AAAA,EACT;AAAA,EAEA,MAAe,IAAI,mBAA4E;AAC9F,UAAM,MAAM,MAAM,KAAK,IAAI,iBAAiB;AAC5C,WAAO,IAAI,CAAC;AAAA,EACb;AAAA,EAES,OAAO,oBAA0E;AACzF,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC1C;AAAA,EAES,wBAAiC;AACzC,WAAO;AAAA,EACR;AACD;AAMO,MAAM,4BAA4B,cAA8E;AAAA,EAKtH,YACkB,QACjB,SACA,SACC;AACD,UAAM,OAAO;AAJI;AAKjB,SAAK,SAAS,QAAQ,UAAU,IAAI,WAAW;AAAA,EAChD;AAAA,EAXA,QAA0B,UAAU,IAAY;AAAA,EAE/B;AAAA,EAWR,aACR,OACA,QACA,eAC+B;AAC/B,WAAO,IAAI,0BAA0B,KAAK,QAAQ,OAAO,KAAK,QAAQ,aAAa;AAAA,EACpF;AAAA,EAES,YACR,cACA,SACa;AACb,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC1C;AACD;","names":[]}
|
||||
Reference in New Issue
Block a user