@dismissible/nestjs-postgres-storage 0.0.2-canary.5daf195.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.
- package/README.md +309 -0
- package/bin/dismissible-prisma.js +57 -0
- package/package.json +66 -0
- package/prisma/generated/prisma/browser.ts +24 -0
- package/prisma/generated/prisma/client.ts +44 -0
- package/prisma/generated/prisma/commonInputTypes.ts +208 -0
- package/prisma/generated/prisma/enums.ts +15 -0
- package/prisma/generated/prisma/internal/class.ts +190 -0
- package/prisma/generated/prisma/internal/prismaNamespace.ts +759 -0
- package/prisma/generated/prisma/internal/prismaNamespaceBrowser.ts +105 -0
- package/prisma/generated/prisma/models/DismissibleItem.ts +1134 -0
- package/prisma/generated/prisma/models.ts +12 -0
- package/prisma/migrations/20251219094936_init/migration.sql +12 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/schema.prisma +23 -0
- package/prisma.config.mjs +33 -0
- package/src/index.ts +6 -0
- package/src/postgres-storage.adapter.spec.ts +160 -0
- package/src/postgres-storage.adapter.ts +90 -0
- package/src/postgres-storage.config.ts +11 -0
- package/src/postgres-storage.module.ts +79 -0
- package/src/prisma-config.spec.ts +93 -0
- package/src/prisma-config.ts +63 -0
- package/src/prisma.service.spec.ts +125 -0
- package/src/prisma.service.ts +44 -0
- package/src/schema-path.spec.ts +22 -0
- package/src/schema-path.ts +17 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// biome-ignore-all lint: generated file
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
/*
|
|
7
|
+
* This file exports various common sort, input & filter types that are not directly linked to a particular model.
|
|
8
|
+
*
|
|
9
|
+
* 🟢 You can import this file directly.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type * as runtime from "@prisma/client/runtime/client"
|
|
13
|
+
import * as $Enums from "./enums"
|
|
14
|
+
import type * as Prisma from "./internal/prismaNamespace"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export type StringFilter<$PrismaModel = never> = {
|
|
18
|
+
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
19
|
+
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
20
|
+
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
21
|
+
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
22
|
+
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
23
|
+
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
24
|
+
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
25
|
+
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
26
|
+
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
27
|
+
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
28
|
+
mode?: Prisma.QueryMode
|
|
29
|
+
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type DateTimeFilter<$PrismaModel = never> = {
|
|
33
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
34
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
35
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
36
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
37
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
38
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
39
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
40
|
+
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
|
44
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
45
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
46
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
47
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
48
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
49
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
50
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
51
|
+
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type SortOrderInput = {
|
|
55
|
+
sort: Prisma.SortOrder
|
|
56
|
+
nulls?: Prisma.NullsOrder
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
|
60
|
+
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
61
|
+
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
62
|
+
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
63
|
+
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
64
|
+
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
65
|
+
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
66
|
+
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
67
|
+
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
68
|
+
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
69
|
+
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
70
|
+
mode?: Prisma.QueryMode
|
|
71
|
+
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
|
72
|
+
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
73
|
+
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
|
74
|
+
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
78
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
79
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
80
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
81
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
82
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
83
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
84
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
85
|
+
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
|
86
|
+
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
87
|
+
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
88
|
+
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
92
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
93
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
94
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
95
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
96
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
97
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
98
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
99
|
+
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
|
100
|
+
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
101
|
+
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
102
|
+
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type NestedStringFilter<$PrismaModel = never> = {
|
|
106
|
+
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
107
|
+
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
108
|
+
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
109
|
+
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
110
|
+
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
111
|
+
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
112
|
+
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
113
|
+
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
114
|
+
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
115
|
+
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
116
|
+
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
|
120
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
121
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
122
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
123
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
124
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
125
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
126
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
127
|
+
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
|
131
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
132
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
133
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
134
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
135
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
136
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
137
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
138
|
+
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
|
142
|
+
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
143
|
+
in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
144
|
+
notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel>
|
|
145
|
+
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
146
|
+
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
147
|
+
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
148
|
+
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
149
|
+
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
150
|
+
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
151
|
+
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
152
|
+
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
|
153
|
+
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
154
|
+
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
|
155
|
+
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type NestedIntFilter<$PrismaModel = never> = {
|
|
159
|
+
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
160
|
+
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
|
161
|
+
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel>
|
|
162
|
+
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
163
|
+
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
164
|
+
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
165
|
+
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
166
|
+
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
170
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
171
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
172
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel>
|
|
173
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
174
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
175
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
176
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
177
|
+
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
|
178
|
+
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
179
|
+
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
180
|
+
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
184
|
+
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
185
|
+
in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
186
|
+
notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> | null
|
|
187
|
+
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
188
|
+
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
189
|
+
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
190
|
+
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
191
|
+
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
|
192
|
+
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
193
|
+
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
194
|
+
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
|
198
|
+
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
|
199
|
+
in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null
|
|
200
|
+
notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null
|
|
201
|
+
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
202
|
+
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
203
|
+
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
204
|
+
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
205
|
+
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// biome-ignore-all lint: generated file
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
/*
|
|
7
|
+
* This file exports all enum related types from the schema.
|
|
8
|
+
*
|
|
9
|
+
* 🟢 You can import this file directly.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// This file is empty because there are no enums in the schema.
|
|
15
|
+
export {}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// biome-ignore-all lint: generated file
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
/*
|
|
7
|
+
* WARNING: This is an internal file that is subject to change!
|
|
8
|
+
*
|
|
9
|
+
* 🛑 Under no circumstances should you import this file directly! 🛑
|
|
10
|
+
*
|
|
11
|
+
* Please import the `PrismaClient` class from the `client.ts` file instead.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import * as runtime from "@prisma/client/runtime/client"
|
|
15
|
+
import type * as Prisma from "./prismaNamespace"
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
const config: runtime.GetPrismaClientConfig = {
|
|
19
|
+
"previewFeatures": [],
|
|
20
|
+
"clientVersion": "7.2.0",
|
|
21
|
+
"engineVersion": "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3",
|
|
22
|
+
"activeProvider": "postgresql",
|
|
23
|
+
"inlineSchema": "// Prisma schema for Dismissible PostgreSQL storage\n// https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"./generated/prisma\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n}\n\nmodel DismissibleItem {\n id String\n userId String @map(\"user_id\")\n createdAt DateTime @default(now()) @map(\"created_at\")\n dismissedAt DateTime? @map(\"dismissed_at\")\n\n @@id([userId, id])\n @@index([userId])\n @@map(\"dismissible_items\")\n}\n",
|
|
24
|
+
"runtimeDataModel": {
|
|
25
|
+
"models": {},
|
|
26
|
+
"enums": {},
|
|
27
|
+
"types": {}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
config.runtimeDataModel = JSON.parse("{\"models\":{\"DismissibleItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"String\",\"dbName\":\"user_id\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"created_at\"},{\"name\":\"dismissedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\",\"dbName\":\"dismissed_at\"}],\"dbName\":\"dismissible_items\"}},\"enums\":{},\"types\":{}}")
|
|
32
|
+
|
|
33
|
+
async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
|
|
34
|
+
const { Buffer } = await import('node:buffer')
|
|
35
|
+
const wasmArray = Buffer.from(wasmBase64, 'base64')
|
|
36
|
+
return new WebAssembly.Module(wasmArray)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
config.compilerWasm = {
|
|
40
|
+
getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.postgresql.js"),
|
|
41
|
+
|
|
42
|
+
getQueryCompilerWasmModule: async () => {
|
|
43
|
+
const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.postgresql.wasm-base64.js")
|
|
44
|
+
return await decodeBase64AsWasm(wasm)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
|
|
51
|
+
'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
|
|
52
|
+
|
|
53
|
+
export interface PrismaClientConstructor {
|
|
54
|
+
/**
|
|
55
|
+
* ## Prisma Client
|
|
56
|
+
*
|
|
57
|
+
* Type-safe database client for TypeScript
|
|
58
|
+
* @example
|
|
59
|
+
* ```
|
|
60
|
+
* const prisma = new PrismaClient()
|
|
61
|
+
* // Fetch zero or more DismissibleItems
|
|
62
|
+
* const dismissibleItems = await prisma.dismissibleItem.findMany()
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* Read more in our [docs](https://pris.ly/d/client).
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
new <
|
|
69
|
+
Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
|
|
70
|
+
LogOpts extends LogOptions<Options> = LogOptions<Options>,
|
|
71
|
+
OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
|
|
72
|
+
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
73
|
+
>(options: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* ## Prisma Client
|
|
78
|
+
*
|
|
79
|
+
* Type-safe database client for TypeScript
|
|
80
|
+
* @example
|
|
81
|
+
* ```
|
|
82
|
+
* const prisma = new PrismaClient()
|
|
83
|
+
* // Fetch zero or more DismissibleItems
|
|
84
|
+
* const dismissibleItems = await prisma.dismissibleItem.findMany()
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* Read more in our [docs](https://pris.ly/d/client).
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
export interface PrismaClient<
|
|
91
|
+
in LogOpts extends Prisma.LogLevel = never,
|
|
92
|
+
in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
|
|
93
|
+
in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
94
|
+
> {
|
|
95
|
+
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
96
|
+
|
|
97
|
+
$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Connect with the database
|
|
101
|
+
*/
|
|
102
|
+
$connect(): runtime.Types.Utils.JsPromise<void>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Disconnect from the database
|
|
106
|
+
*/
|
|
107
|
+
$disconnect(): runtime.Types.Utils.JsPromise<void>;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Executes a prepared raw query and returns the number of affected rows.
|
|
111
|
+
* @example
|
|
112
|
+
* ```
|
|
113
|
+
* const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
116
|
+
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
117
|
+
*/
|
|
118
|
+
$executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Executes a raw query and returns the number of affected rows.
|
|
122
|
+
* Susceptible to SQL injections, see documentation.
|
|
123
|
+
* @example
|
|
124
|
+
* ```
|
|
125
|
+
* const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
129
|
+
*/
|
|
130
|
+
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Performs a prepared raw query and returns the `SELECT` data.
|
|
134
|
+
* @example
|
|
135
|
+
* ```
|
|
136
|
+
* const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
140
|
+
*/
|
|
141
|
+
$queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Performs a raw query and returns the `SELECT` data.
|
|
145
|
+
* Susceptible to SQL injections, see documentation.
|
|
146
|
+
* @example
|
|
147
|
+
* ```
|
|
148
|
+
* const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
152
|
+
*/
|
|
153
|
+
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
|
|
158
|
+
* @example
|
|
159
|
+
* ```
|
|
160
|
+
* const [george, bob, alice] = await prisma.$transaction([
|
|
161
|
+
* prisma.user.create({ data: { name: 'George' } }),
|
|
162
|
+
* prisma.user.create({ data: { name: 'Bob' } }),
|
|
163
|
+
* prisma.user.create({ data: { name: 'Alice' } }),
|
|
164
|
+
* ])
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
|
|
168
|
+
*/
|
|
169
|
+
$transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
170
|
+
|
|
171
|
+
$transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
|
|
172
|
+
|
|
173
|
+
$extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
|
|
174
|
+
extArgs: ExtArgs
|
|
175
|
+
}>>
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* `prisma.dismissibleItem`: Exposes CRUD operations for the **DismissibleItem** model.
|
|
179
|
+
* Example usage:
|
|
180
|
+
* ```ts
|
|
181
|
+
* // Fetch zero or more DismissibleItems
|
|
182
|
+
* const dismissibleItems = await prisma.dismissibleItem.findMany()
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
get dismissibleItem(): Prisma.DismissibleItemDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export function getPrismaClientClass(): PrismaClientConstructor {
|
|
189
|
+
return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
|
|
190
|
+
}
|