223 lines
11 KiB
JavaScript
223 lines
11 KiB
JavaScript
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
const {
|
|
PrismaClientKnownRequestError,
|
|
PrismaClientUnknownRequestError,
|
|
PrismaClientRustPanicError,
|
|
PrismaClientInitializationError,
|
|
PrismaClientValidationError,
|
|
NotFoundError,
|
|
getPrismaClient,
|
|
sqltag,
|
|
empty,
|
|
join,
|
|
raw,
|
|
Decimal,
|
|
Debug,
|
|
objectEnumValues,
|
|
makeStrictEnum,
|
|
Extensions,
|
|
warnOnce,
|
|
defineDmmfProperty,
|
|
Public,
|
|
getRuntime
|
|
} = require('./runtime/library.js')
|
|
|
|
|
|
const Prisma = {}
|
|
|
|
exports.Prisma = Prisma
|
|
exports.$Enums = {}
|
|
|
|
/**
|
|
* Prisma Client JS version: 5.19.1
|
|
* Query Engine version: 69d742ee20b815d88e17e54db4a2a7a3b30324e3
|
|
*/
|
|
Prisma.prismaVersion = {
|
|
client: "5.19.1",
|
|
engine: "69d742ee20b815d88e17e54db4a2a7a3b30324e3"
|
|
}
|
|
|
|
Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError;
|
|
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError
|
|
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError
|
|
Prisma.PrismaClientInitializationError = PrismaClientInitializationError
|
|
Prisma.PrismaClientValidationError = PrismaClientValidationError
|
|
Prisma.NotFoundError = NotFoundError
|
|
Prisma.Decimal = Decimal
|
|
|
|
/**
|
|
* Re-export of sql-template-tag
|
|
*/
|
|
Prisma.sql = sqltag
|
|
Prisma.empty = empty
|
|
Prisma.join = join
|
|
Prisma.raw = raw
|
|
Prisma.validator = Public.validator
|
|
|
|
/**
|
|
* Extensions
|
|
*/
|
|
Prisma.getExtensionContext = Extensions.getExtensionContext
|
|
Prisma.defineExtension = Extensions.defineExtension
|
|
|
|
/**
|
|
* Shorthand utilities for JSON filtering
|
|
*/
|
|
Prisma.DbNull = objectEnumValues.instances.DbNull
|
|
Prisma.JsonNull = objectEnumValues.instances.JsonNull
|
|
Prisma.AnyNull = objectEnumValues.instances.AnyNull
|
|
|
|
Prisma.NullTypes = {
|
|
DbNull: objectEnumValues.classes.DbNull,
|
|
JsonNull: objectEnumValues.classes.JsonNull,
|
|
AnyNull: objectEnumValues.classes.AnyNull
|
|
}
|
|
|
|
|
|
const path = require('path')
|
|
|
|
/**
|
|
* Enums
|
|
*/
|
|
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({
|
|
ReadUncommitted: 'ReadUncommitted',
|
|
ReadCommitted: 'ReadCommitted',
|
|
RepeatableRead: 'RepeatableRead',
|
|
Serializable: 'Serializable'
|
|
});
|
|
|
|
exports.Prisma.LearnScalarFieldEnum = {
|
|
id: 'id',
|
|
command: 'command',
|
|
result: 'result',
|
|
user_id: 'user_id',
|
|
created_at: 'created_at'
|
|
};
|
|
|
|
exports.Prisma.Nsfw_contentScalarFieldEnum = {
|
|
id: 'id',
|
|
text: 'text',
|
|
created_at: 'created_at',
|
|
persona: 'persona'
|
|
};
|
|
|
|
exports.Prisma.StatementScalarFieldEnum = {
|
|
id: 'id',
|
|
text: 'text',
|
|
search_text: 'search_text',
|
|
conversation: 'conversation',
|
|
created_at: 'created_at',
|
|
in_response_to: 'in_response_to',
|
|
search_in_response_to: 'search_in_response_to',
|
|
persona: 'persona'
|
|
};
|
|
|
|
exports.Prisma.SortOrder = {
|
|
asc: 'asc',
|
|
desc: 'desc'
|
|
};
|
|
|
|
exports.Prisma.NullsOrder = {
|
|
first: 'first',
|
|
last: 'last'
|
|
};
|
|
|
|
|
|
exports.Prisma.ModelName = {
|
|
learn: 'learn',
|
|
nsfw_content: 'nsfw_content',
|
|
statement: 'statement'
|
|
};
|
|
/**
|
|
* Create the Client
|
|
*/
|
|
const config = {
|
|
"generator": {
|
|
"name": "client",
|
|
"provider": {
|
|
"fromEnvVar": null,
|
|
"value": "prisma-client-js"
|
|
},
|
|
"output": {
|
|
"value": "C:\\Users\\migan\\projects\\Muffin-NOT-Ai\\prisma",
|
|
"fromEnvVar": null
|
|
},
|
|
"config": {
|
|
"engineType": "library"
|
|
},
|
|
"binaryTargets": [
|
|
{
|
|
"fromEnvVar": null,
|
|
"value": "windows",
|
|
"native": true
|
|
}
|
|
],
|
|
"previewFeatures": [],
|
|
"sourceFilePath": "C:\\Users\\migan\\projects\\Muffin-NOT-Ai\\prisma\\schema.prisma",
|
|
"isCustomOutput": true
|
|
},
|
|
"relativeEnvPaths": {
|
|
"rootEnvPath": null,
|
|
"schemaEnvPath": "../.env"
|
|
},
|
|
"relativePath": "",
|
|
"clientVersion": "5.19.1",
|
|
"engineVersion": "69d742ee20b815d88e17e54db4a2a7a3b30324e3",
|
|
"datasourceNames": [
|
|
"db"
|
|
],
|
|
"activeProvider": "mysql",
|
|
"inlineDatasources": {
|
|
"db": {
|
|
"url": {
|
|
"fromEnvVar": "DATABASE_URL",
|
|
"value": null
|
|
}
|
|
}
|
|
},
|
|
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./\"\n}\n\ndatasource db {\n provider = \"mysql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel learn {\n id Int @id @default(autoincrement())\n command String @db.VarChar(255)\n result String @db.VarChar(255)\n user_id String @db.VarChar(255)\n created_at DateTime @default(now()) @db.DateTime(0)\n}\n\nmodel nsfw_content {\n id Int @id @default(autoincrement())\n text String @default(\"\") @db.VarChar(255)\n created_at DateTime? @default(now()) @db.DateTime(0)\n persona String @default(\"\") @db.VarChar(50)\n}\n\nmodel statement {\n id Int @id @default(autoincrement())\n text String @db.VarChar(255)\n search_text String @default(\"\") @db.VarChar(255)\n conversation String @default(\"\") @db.VarChar(32)\n created_at DateTime? @default(now()) @db.DateTime(0)\n in_response_to String? @db.VarChar(255)\n search_in_response_to String @default(\"\") @db.VarChar(255)\n persona String @default(\"\") @db.VarChar(50)\n}\n",
|
|
"inlineSchemaHash": "9c4fd3a80b1a8ccfab7d3088752694bb8d9d16041b08a9297ffc2268d5dd1468",
|
|
"copyEngine": true
|
|
}
|
|
|
|
const fs = require('fs')
|
|
|
|
config.dirname = __dirname
|
|
if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
|
|
const alternativePaths = [
|
|
"prisma",
|
|
"",
|
|
]
|
|
|
|
const alternativePath = alternativePaths.find((altPath) => {
|
|
return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma'))
|
|
}) ?? alternativePaths[0]
|
|
|
|
config.dirname = path.join(process.cwd(), alternativePath)
|
|
config.isBundled = true
|
|
}
|
|
|
|
config.runtimeDataModel = JSON.parse("{\"models\":{\"learn\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"command\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"result\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"nsfw_content\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"text\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persona\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"statement\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"text\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"search_text\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"conversation\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"created_at\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"in_response_to\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"search_in_response_to\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"persona\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}")
|
|
defineDmmfProperty(exports.Prisma, config.runtimeDataModel)
|
|
config.engineWasm = undefined
|
|
|
|
|
|
const { warnEnvConflicts } = require('./runtime/library.js')
|
|
|
|
warnEnvConflicts({
|
|
rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath),
|
|
schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath)
|
|
})
|
|
|
|
const PrismaClient = getPrismaClient(config)
|
|
exports.PrismaClient = PrismaClient
|
|
Object.assign(exports, Prisma)
|
|
|
|
// file annotations for bundling tools to include these files
|
|
path.join(__dirname, "query_engine-windows.dll.node");
|
|
path.join(process.cwd(), "prisma/query_engine-windows.dll.node")
|
|
// file annotations for bundling tools to include these files
|
|
path.join(__dirname, "schema.prisma");
|
|
path.join(process.cwd(), "prisma/schema.prisma")
|