| 1 | // ⚠️ GENERATED FILE - DO NOT EDIT |
| 2 | // This file is automatically generated by 'prisma contract emit'. |
| 3 | // To regenerate, run: prisma contract emit |
| 4 | import type { QueryOperationTypes as PgAdapterQueryOps } from '@prisma/orm-postgres/adapter/operation-types'; |
| 5 | import type { |
| 6 | Bit, |
| 7 | Char, |
| 8 | CodecTypes as PgTypes, |
| 9 | Interval, |
| 10 | JsonValue, |
| 11 | Numeric, |
| 12 | Time, |
| 13 | TimeString, |
| 14 | Timestamp, |
| 15 | TimestampString, |
| 16 | Timestamptz, |
| 17 | TimestamptzString, |
| 18 | Timetz, |
| 19 | VarBit, |
| 20 | Varchar, |
| 21 | } from '@prisma/orm-postgres/target/codec-types'; |
| 22 | |
| 23 | import type { |
| 24 | ContractWithTypeMaps, |
| 25 | RelationKeys, |
| 26 | TypeMaps as TypeMapsType, |
| 27 | } from '@prisma/orm-postgres/family-contract/types'; |
| 28 | import type { |
| 29 | Contract as ContractType, |
| 30 | ExecutionHashBase, |
| 31 | NamespaceId, |
| 32 | ProfileHashBase, |
| 33 | StorageHashBase, |
| 34 | } from '@prisma/orm-postgres/contract/types'; |
| 35 | |
| 36 | export type StorageHash = |
| 37 | StorageHashBase<'b09d1a81a21c191e35c6d2e6bbb462154b005582529fa8120638576d8ee3cd1d'>; |
| 38 | export type ExecutionHash = ExecutionHashBase<string>; |
| 39 | export type ProfileHash = |
| 40 | ProfileHashBase<'3916f444a8a17ad749191acf9e08dad97d1a327b88c2f1d45d12f240296aa8b2'>; |
| 41 | |
| 42 | export type CodecTypes = PgTypes; |
| 43 | export type LaneCodecTypes = CodecTypes; |
| 44 | export type QueryOperationTypes = PgAdapterQueryOps<CodecTypes>; |
| 45 | export type AggregateTypes = { |
| 46 | readonly avg: { |
| 47 | readonly byCodec: { |
| 48 | readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 49 | readonly 'pg/float4@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 50 | readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 51 | readonly 'pg/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 52 | readonly 'pg/int2@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 53 | readonly 'pg/int4@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 54 | readonly 'pg/int8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 55 | readonly 'pg/int8number@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 56 | readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 57 | readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 58 | readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 59 | readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 60 | readonly 'pg/unboundedint@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 61 | readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 62 | readonly 'sql/int@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 63 | }; |
| 64 | }; |
| 65 | readonly avgDecimal: { |
| 66 | readonly byCodec: { |
| 67 | readonly 'pg/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 68 | readonly 'pg/int2@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 69 | readonly 'pg/int4@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 70 | readonly 'pg/int8@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 71 | readonly 'pg/int8number@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 72 | readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 73 | readonly 'pg/unboundedint@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 74 | readonly 'sql/int@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 75 | }; |
| 76 | }; |
| 77 | readonly count: { |
| 78 | readonly byCodec: {}; |
| 79 | readonly withoutInput: { readonly output: 'pg/int8number@1'; readonly nullable: false }; |
| 80 | readonly anyInput: { readonly output: 'pg/int8number@1'; readonly nullable: false }; |
| 81 | }; |
| 82 | readonly countBigInt: { |
| 83 | readonly byCodec: {}; |
| 84 | readonly withoutInput: { readonly output: 'pg/int8@1'; readonly nullable: false }; |
| 85 | readonly anyInput: { readonly output: 'pg/int8@1'; readonly nullable: false }; |
| 86 | }; |
| 87 | readonly max: { |
| 88 | readonly byCodec: { |
| 89 | readonly 'pg/char@1': { readonly output: 'pg/char@1'; readonly nullable: true }; |
| 90 | readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true }; |
| 91 | readonly 'pg/date-temporal@1': { |
| 92 | readonly output: 'pg/date-temporal@1'; |
| 93 | readonly nullable: true; |
| 94 | }; |
| 95 | readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true }; |
| 96 | readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true }; |
| 97 | readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true }; |
| 98 | readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 99 | readonly 'pg/inet@1': { readonly output: 'pg/inet@1'; readonly nullable: true }; |
| 100 | readonly 'pg/int@1': { readonly output: 'pg/int@1'; readonly nullable: true }; |
| 101 | readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true }; |
| 102 | readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true }; |
| 103 | readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; |
| 104 | readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 105 | readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 106 | readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 107 | readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true }; |
| 108 | readonly 'pg/text@1': { readonly output: 'pg/text@1'; readonly nullable: true }; |
| 109 | readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true }; |
| 110 | readonly 'pg/time-temporal@1': { |
| 111 | readonly output: 'pg/time-temporal@1'; |
| 112 | readonly nullable: true; |
| 113 | }; |
| 114 | readonly 'pg/timestamp-string@1': { |
| 115 | readonly output: 'pg/timestamp-string@1'; |
| 116 | readonly nullable: true; |
| 117 | }; |
| 118 | readonly 'pg/timestamp-temporal@1': { |
| 119 | readonly output: 'pg/timestamp-temporal@1'; |
| 120 | readonly nullable: true; |
| 121 | }; |
| 122 | readonly 'pg/timestamptz-string@1': { |
| 123 | readonly output: 'pg/timestamptz-string@1'; |
| 124 | readonly nullable: true; |
| 125 | }; |
| 126 | readonly 'pg/timestamptz-temporal@1': { |
| 127 | readonly output: 'pg/timestamptz-temporal@1'; |
| 128 | readonly nullable: true; |
| 129 | }; |
| 130 | readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true }; |
| 131 | readonly 'pg/unboundedint@1': { |
| 132 | readonly output: 'pg/unboundedint@1'; |
| 133 | readonly nullable: true; |
| 134 | }; |
| 135 | readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; |
| 136 | readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true }; |
| 137 | readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true }; |
| 138 | readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true }; |
| 139 | readonly 'sql/text@1': { readonly output: 'sql/text@1'; readonly nullable: true }; |
| 140 | readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; |
| 141 | }; |
| 142 | }; |
| 143 | readonly min: { |
| 144 | readonly byCodec: { |
| 145 | readonly 'pg/char@1': { readonly output: 'pg/char@1'; readonly nullable: true }; |
| 146 | readonly 'pg/date-string@1': { readonly output: 'pg/date-string@1'; readonly nullable: true }; |
| 147 | readonly 'pg/date-temporal@1': { |
| 148 | readonly output: 'pg/date-temporal@1'; |
| 149 | readonly nullable: true; |
| 150 | }; |
| 151 | readonly 'pg/enum@1': { readonly output: 'pg/enum@1'; readonly nullable: true }; |
| 152 | readonly 'pg/float@1': { readonly output: 'pg/float@1'; readonly nullable: true }; |
| 153 | readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true }; |
| 154 | readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 155 | readonly 'pg/inet@1': { readonly output: 'pg/inet@1'; readonly nullable: true }; |
| 156 | readonly 'pg/int@1': { readonly output: 'pg/int@1'; readonly nullable: true }; |
| 157 | readonly 'pg/int2@1': { readonly output: 'pg/int2@1'; readonly nullable: true }; |
| 158 | readonly 'pg/int4@1': { readonly output: 'pg/int4@1'; readonly nullable: true }; |
| 159 | readonly 'pg/int8@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; |
| 160 | readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 161 | readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 162 | readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 163 | readonly 'pg/text-array@1': { readonly output: 'pg/text-array@1'; readonly nullable: true }; |
| 164 | readonly 'pg/text@1': { readonly output: 'pg/text@1'; readonly nullable: true }; |
| 165 | readonly 'pg/time-string@1': { readonly output: 'pg/time-string@1'; readonly nullable: true }; |
| 166 | readonly 'pg/time-temporal@1': { |
| 167 | readonly output: 'pg/time-temporal@1'; |
| 168 | readonly nullable: true; |
| 169 | }; |
| 170 | readonly 'pg/timestamp-string@1': { |
| 171 | readonly output: 'pg/timestamp-string@1'; |
| 172 | readonly nullable: true; |
| 173 | }; |
| 174 | readonly 'pg/timestamp-temporal@1': { |
| 175 | readonly output: 'pg/timestamp-temporal@1'; |
| 176 | readonly nullable: true; |
| 177 | }; |
| 178 | readonly 'pg/timestamptz-string@1': { |
| 179 | readonly output: 'pg/timestamptz-string@1'; |
| 180 | readonly nullable: true; |
| 181 | }; |
| 182 | readonly 'pg/timestamptz-temporal@1': { |
| 183 | readonly output: 'pg/timestamptz-temporal@1'; |
| 184 | readonly nullable: true; |
| 185 | }; |
| 186 | readonly 'pg/timetz@1': { readonly output: 'pg/timetz@1'; readonly nullable: true }; |
| 187 | readonly 'pg/unboundedint@1': { |
| 188 | readonly output: 'pg/unboundedint@1'; |
| 189 | readonly nullable: true; |
| 190 | }; |
| 191 | readonly 'pg/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; |
| 192 | readonly 'sql/char@1': { readonly output: 'sql/char@1'; readonly nullable: true }; |
| 193 | readonly 'sql/float@1': { readonly output: 'sql/float@1'; readonly nullable: true }; |
| 194 | readonly 'sql/int@1': { readonly output: 'sql/int@1'; readonly nullable: true }; |
| 195 | readonly 'sql/text@1': { readonly output: 'sql/text@1'; readonly nullable: true }; |
| 196 | readonly 'sql/varchar@1': { readonly output: 'pg/text@1'; readonly nullable: true }; |
| 197 | }; |
| 198 | }; |
| 199 | readonly sum: { |
| 200 | readonly byCodec: { |
| 201 | readonly 'pg/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 202 | readonly 'pg/float4@1': { readonly output: 'pg/float4@1'; readonly nullable: true }; |
| 203 | readonly 'pg/float8@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 204 | readonly 'pg/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 205 | readonly 'pg/int2@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 206 | readonly 'pg/int4@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 207 | readonly 'pg/int8@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 208 | readonly 'pg/int8number@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 209 | readonly 'pg/interval@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 210 | readonly 'pg/numeric@1': { readonly output: 'pg/numeric@1'; readonly nullable: true }; |
| 211 | readonly 'pg/time-string@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 212 | readonly 'pg/time-temporal@1': { readonly output: 'pg/interval@1'; readonly nullable: true }; |
| 213 | readonly 'pg/unboundedint@1': { |
| 214 | readonly output: 'pg/unboundedint@1'; |
| 215 | readonly nullable: true; |
| 216 | }; |
| 217 | readonly 'sql/float@1': { readonly output: 'pg/float8@1'; readonly nullable: true }; |
| 218 | readonly 'sql/int@1': { readonly output: 'pg/int8number@1'; readonly nullable: true }; |
| 219 | }; |
| 220 | }; |
| 221 | readonly sumBigInt: { |
| 222 | readonly byCodec: { |
| 223 | readonly 'pg/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; |
| 224 | readonly 'pg/int2@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; |
| 225 | readonly 'pg/int4@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; |
| 226 | readonly 'pg/int8@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true }; |
| 227 | readonly 'pg/int8number@1': { readonly output: 'pg/unboundedint@1'; readonly nullable: true }; |
| 228 | readonly 'pg/unboundedint@1': { |
| 229 | readonly output: 'pg/unboundedint@1'; |
| 230 | readonly nullable: true; |
| 231 | }; |
| 232 | readonly 'sql/int@1': { readonly output: 'pg/int8@1'; readonly nullable: true }; |
| 233 | }; |
| 234 | }; |
| 235 | }; |
| 236 | type DefaultLiteralValue<CodecId extends string, Encoded> = CodecId extends keyof CodecTypes |
| 237 | ? Encoded extends CodecTypes[CodecId]['json'] |
| 238 | ? Encoded |
| 239 | : CodecTypes[CodecId]['json'] |
| 240 | : Encoded; |
| 241 | |
| 242 | export type FieldOutputTypes = { |
| 243 | readonly public: { |
| 244 | readonly Post: { |
| 245 | readonly id: CodecTypes['pg/int4@1']['output']; |
| 246 | readonly title: CodecTypes['pg/text@1']['output']; |
| 247 | readonly authorId: CodecTypes['pg/int4@1']['output']; |
| 248 | }; |
| 249 | readonly User: { |
| 250 | readonly id: CodecTypes['pg/int4@1']['output']; |
| 251 | readonly email: CodecTypes['pg/text@1']['output']; |
| 252 | readonly name: CodecTypes['pg/text@1']['output'] | null; |
| 253 | }; |
| 254 | }; |
| 255 | }; |
| 256 | export type FieldInputTypes = { |
| 257 | readonly public: { |
| 258 | readonly Post: { |
| 259 | readonly id: CodecTypes['pg/int4@1']['input']; |
| 260 | readonly title: CodecTypes['pg/text@1']['input']; |
| 261 | readonly authorId: CodecTypes['pg/int4@1']['input']; |
| 262 | }; |
| 263 | readonly User: { |
| 264 | readonly id: CodecTypes['pg/int4@1']['input']; |
| 265 | readonly email: CodecTypes['pg/text@1']['input']; |
| 266 | readonly name: CodecTypes['pg/text@1']['input'] | null; |
| 267 | }; |
| 268 | }; |
| 269 | }; |
| 270 | export type StorageColumnTypes = { |
| 271 | readonly public: { |
| 272 | readonly post: { |
| 273 | readonly authorId: CodecTypes['pg/int4@1']['output']; |
| 274 | readonly id: CodecTypes['pg/int4@1']['output']; |
| 275 | readonly title: CodecTypes['pg/text@1']['output']; |
| 276 | }; |
| 277 | readonly user: { |
| 278 | readonly email: CodecTypes['pg/text@1']['output']; |
| 279 | readonly id: CodecTypes['pg/int4@1']['output']; |
| 280 | readonly name: CodecTypes['pg/text@1']['output'] | null; |
| 281 | }; |
| 282 | }; |
| 283 | }; |
| 284 | export type StorageColumnInputTypes = { |
| 285 | readonly public: { |
| 286 | readonly post: { |
| 287 | readonly authorId: CodecTypes['pg/int4@1']['input']; |
| 288 | readonly id: CodecTypes['pg/int4@1']['input']; |
| 289 | readonly title: CodecTypes['pg/text@1']['input']; |
| 290 | }; |
| 291 | readonly user: { |
| 292 | readonly email: CodecTypes['pg/text@1']['input']; |
| 293 | readonly id: CodecTypes['pg/int4@1']['input']; |
| 294 | readonly name: CodecTypes['pg/text@1']['input'] | null; |
| 295 | }; |
| 296 | }; |
| 297 | }; |
| 298 | |
| 299 | export namespace Models { |
| 300 | export type public_User = { |
| 301 | id: CodecTypes['pg/int4@1']['output']; |
| 302 | email: CodecTypes['pg/text@1']['output']; |
| 303 | name: CodecTypes['pg/text@1']['output'] | null; |
| 304 | posts: public_Post[]; |
| 305 | readonly [RelationKeys]?: 'posts'; |
| 306 | }; |
| 307 | export type public_Post = { |
| 308 | id: CodecTypes['pg/int4@1']['output']; |
| 309 | title: CodecTypes['pg/text@1']['output']; |
| 310 | authorId: CodecTypes['pg/int4@1']['output']; |
| 311 | author: public_User; |
| 312 | readonly [RelationKeys]?: 'author'; |
| 313 | }; |
| 314 | } |
| 315 | |
| 316 | export declare const models: { |
| 317 | public: { |
| 318 | User: Models.public_User; |
| 319 | Post: Models.public_Post; |
| 320 | }; |
| 321 | }; |
| 322 | |
| 323 | export type TypeMaps = TypeMapsType< |
| 324 | CodecTypes, |
| 325 | QueryOperationTypes, |
| 326 | FieldOutputTypes, |
| 327 | FieldInputTypes, |
| 328 | StorageColumnTypes, |
| 329 | StorageColumnInputTypes, |
| 330 | AggregateTypes |
| 331 | >; |
| 332 | |
| 333 | type ContractBase = Omit< |
| 334 | ContractType<{ |
| 335 | readonly namespaces: { |
| 336 | readonly public: { |
| 337 | readonly id: 'public'; |
| 338 | readonly kind: 'postgres-schema'; |
| 339 | readonly entries: { |
| 340 | readonly table: { |
| 341 | readonly post: { |
| 342 | columns: { |
| 343 | readonly id: { |
| 344 | readonly nativeType: 'int4'; |
| 345 | readonly codecId: 'pg/int4@1'; |
| 346 | readonly nullable: false; |
| 347 | readonly default: { |
| 348 | readonly kind: 'function'; |
| 349 | readonly expression: 'autoincrement()'; |
| 350 | }; |
| 351 | }; |
| 352 | readonly title: { |
| 353 | readonly nativeType: 'text'; |
| 354 | readonly codecId: 'pg/text@1'; |
| 355 | readonly nullable: false; |
| 356 | }; |
| 357 | readonly authorId: { |
| 358 | readonly nativeType: 'int4'; |
| 359 | readonly codecId: 'pg/int4@1'; |
| 360 | readonly nullable: false; |
| 361 | }; |
| 362 | }; |
| 363 | primaryKey: { readonly columns: readonly ['id'] }; |
| 364 | uniques: readonly []; |
| 365 | indexes: readonly [ |
| 366 | { |
| 367 | readonly name: 'post_authorId_idx_e47547ed'; |
| 368 | readonly prefix: 'post_authorId_idx'; |
| 369 | readonly columns: readonly ['authorId']; |
| 370 | readonly unique: false; |
| 371 | }, |
| 372 | ]; |
| 373 | foreignKeys: readonly [ |
| 374 | { |
| 375 | readonly source: { |
| 376 | readonly namespaceId: 'public' & NamespaceId; |
| 377 | readonly tableName: 'post'; |
| 378 | readonly columns: readonly ['authorId']; |
| 379 | }; |
| 380 | readonly target: { |
| 381 | readonly namespaceId: 'public' & NamespaceId; |
| 382 | readonly tableName: 'user'; |
| 383 | readonly columns: readonly ['id']; |
| 384 | }; |
| 385 | }, |
| 386 | ]; |
| 387 | }; |
| 388 | readonly user: { |
| 389 | columns: { |
| 390 | readonly id: { |
| 391 | readonly nativeType: 'int4'; |
| 392 | readonly codecId: 'pg/int4@1'; |
| 393 | readonly nullable: false; |
| 394 | readonly default: { |
| 395 | readonly kind: 'function'; |
| 396 | readonly expression: 'autoincrement()'; |
| 397 | }; |
| 398 | }; |
| 399 | readonly email: { |
| 400 | readonly nativeType: 'text'; |
| 401 | readonly codecId: 'pg/text@1'; |
| 402 | readonly nullable: false; |
| 403 | }; |
| 404 | readonly name: { |
| 405 | readonly nativeType: 'text'; |
| 406 | readonly codecId: 'pg/text@1'; |
| 407 | readonly nullable: true; |
| 408 | }; |
| 409 | }; |
| 410 | primaryKey: { readonly columns: readonly ['id'] }; |
| 411 | uniques: readonly [{ readonly columns: readonly ['email'] }]; |
| 412 | indexes: readonly []; |
| 413 | foreignKeys: readonly []; |
| 414 | }; |
| 415 | }; |
| 416 | }; |
| 417 | }; |
| 418 | }; |
| 419 | readonly storageHash: StorageHash; |
| 420 | }>, |
| 421 | 'roots' | 'domain' |
| 422 | > & { |
| 423 | readonly target: 'postgres'; |
| 424 | readonly targetFamily: 'sql'; |
| 425 | readonly roots: { |
| 426 | readonly user: { readonly namespace: 'public' & NamespaceId; readonly model: 'User' }; |
| 427 | readonly post: { readonly namespace: 'public' & NamespaceId; readonly model: 'Post' }; |
| 428 | }; |
| 429 | readonly domain: { |
| 430 | readonly namespaces: { |
| 431 | readonly public: { |
| 432 | readonly models: { |
| 433 | readonly Post: { |
| 434 | readonly fields: { |
| 435 | readonly id: { |
| 436 | readonly nullable: false; |
| 437 | readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; |
| 438 | }; |
| 439 | readonly title: { |
| 440 | readonly nullable: false; |
| 441 | readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; |
| 442 | }; |
| 443 | readonly authorId: { |
| 444 | readonly nullable: false; |
| 445 | readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; |
| 446 | }; |
| 447 | }; |
| 448 | readonly relations: { |
| 449 | readonly author: { |
| 450 | readonly to: { readonly namespace: 'public' & NamespaceId; readonly model: 'User' }; |
| 451 | readonly cardinality: 'N:1'; |
| 452 | readonly nullable: false; |
| 453 | readonly on: { |
| 454 | readonly localFields: readonly ['authorId']; |
| 455 | readonly targetFields: readonly ['id']; |
| 456 | }; |
| 457 | }; |
| 458 | }; |
| 459 | readonly storage: { |
| 460 | readonly table: 'post'; |
| 461 | readonly namespaceId: 'public'; |
| 462 | readonly fields: { |
| 463 | readonly id: { readonly column: 'id' }; |
| 464 | readonly title: { readonly column: 'title' }; |
| 465 | readonly authorId: { readonly column: 'authorId' }; |
| 466 | }; |
| 467 | }; |
| 468 | }; |
| 469 | readonly User: { |
| 470 | readonly fields: { |
| 471 | readonly id: { |
| 472 | readonly nullable: false; |
| 473 | readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/int4@1' }; |
| 474 | }; |
| 475 | readonly email: { |
| 476 | readonly nullable: false; |
| 477 | readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; |
| 478 | }; |
| 479 | readonly name: { |
| 480 | readonly nullable: true; |
| 481 | readonly type: { readonly kind: 'scalar'; readonly codecId: 'pg/text@1' }; |
| 482 | }; |
| 483 | }; |
| 484 | readonly relations: { |
| 485 | readonly posts: { |
| 486 | readonly to: { readonly namespace: 'public' & NamespaceId; readonly model: 'Post' }; |
| 487 | readonly cardinality: '1:N'; |
| 488 | readonly on: { |
| 489 | readonly localFields: readonly ['id']; |
| 490 | readonly targetFields: readonly ['authorId']; |
| 491 | }; |
| 492 | }; |
| 493 | }; |
| 494 | readonly storage: { |
| 495 | readonly table: 'user'; |
| 496 | readonly namespaceId: 'public'; |
| 497 | readonly fields: { |
| 498 | readonly id: { readonly column: 'id' }; |
| 499 | readonly email: { readonly column: 'email' }; |
| 500 | readonly name: { readonly column: 'name' }; |
| 501 | }; |
| 502 | }; |
| 503 | }; |
| 504 | }; |
| 505 | }; |
| 506 | }; |
| 507 | }; |
| 508 | readonly capabilities: { |
| 509 | readonly postgres: { |
| 510 | readonly distinctOn: true; |
| 511 | readonly jsonAgg: true; |
| 512 | readonly lateral: true; |
| 513 | readonly limit: true; |
| 514 | readonly orderBy: true; |
| 515 | readonly returning: true; |
| 516 | }; |
| 517 | readonly sql: { |
| 518 | readonly checkConstraint: true; |
| 519 | readonly defaultInInsert: true; |
| 520 | readonly enums: true; |
| 521 | readonly lateral: true; |
| 522 | readonly returning: true; |
| 523 | readonly scalarList: true; |
| 524 | }; |
| 525 | }; |
| 526 | readonly extensions: {}; |
| 527 | readonly meta: {}; |
| 528 | |
| 529 | readonly profileHash: ProfileHash; |
| 530 | }; |
| 531 | |
| 532 | export type Contract = ContractWithTypeMaps<ContractBase, TypeMaps>; |
| 533 | |
| 534 | export type Namespaces = Contract['storage']['namespaces']; |