@effect-app/infra 2.0.1 → 2.1.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/CHANGELOG.md +12 -0
- package/_cjs/api/internal/RequestContextMiddleware.cjs +2 -3
- package/_cjs/api/internal/RequestContextMiddleware.cjs.map +1 -1
- package/_cjs/api/internal/events.cjs +2 -2
- package/_cjs/api/internal/events.cjs.map +1 -1
- package/_cjs/api/setupRequest.cjs +1 -1
- package/_cjs/api/setupRequest.cjs.map +1 -1
- package/_cjs/fileUtil.cjs +48 -0
- package/_cjs/fileUtil.cjs.map +1 -0
- package/_cjs/logger/shared.cjs +2 -2
- package/_cjs/logger/shared.cjs.map +1 -1
- package/_cjs/services/CUPS.cjs +118 -0
- package/_cjs/services/CUPS.cjs.map +1 -0
- package/_cjs/services/QueueMaker/SQLQueue.cjs +1 -1
- package/_cjs/services/QueueMaker/SQLQueue.cjs.map +1 -1
- package/_cjs/services/QueueMaker/memQueue.cjs +1 -1
- package/_cjs/services/QueueMaker/memQueue.cjs.map +1 -1
- package/_cjs/services/QueueMaker/sbqueue.cjs +1 -1
- package/_cjs/services/QueueMaker/sbqueue.cjs.map +1 -1
- package/_cjs/services/Store/Cosmos.cjs +1 -1
- package/_cjs/services/Store/Cosmos.cjs.map +1 -1
- package/_cjs/services/Store/Disk.cjs +1 -1
- package/_cjs/services/adapters/SQL/Model.cjs +500 -0
- package/_cjs/services/adapters/SQL/Model.cjs.map +1 -0
- package/_cjs/services/adapters/SQL.cjs +11 -0
- package/_cjs/services/adapters/SQL.cjs.map +1 -0
- package/_cjs/services/adapters/ServiceBus.cjs +76 -0
- package/_cjs/services/adapters/ServiceBus.cjs.map +1 -0
- package/_cjs/services/adapters/cosmos-client.cjs +18 -0
- package/_cjs/services/adapters/cosmos-client.cjs.map +1 -0
- package/_cjs/services/adapters/index.cjs +6 -0
- package/_cjs/services/adapters/index.cjs.map +1 -0
- package/_cjs/services/adapters/logger.cjs +9 -0
- package/_cjs/services/adapters/logger.cjs.map +1 -0
- package/_cjs/services/adapters/memQueue.cjs +31 -0
- package/_cjs/services/adapters/memQueue.cjs.map +1 -0
- package/_cjs/services/adapters/mongo-client.cjs +20 -0
- package/_cjs/services/adapters/mongo-client.cjs.map +1 -0
- package/_cjs/services/adapters/redis-client.cjs +83 -0
- package/_cjs/services/adapters/redis-client.cjs.map +1 -0
- package/dist/api/internal/RequestContextMiddleware.d.ts.map +1 -1
- package/dist/api/internal/RequestContextMiddleware.js +3 -4
- package/dist/api/internal/events.d.ts.map +1 -1
- package/dist/api/internal/events.js +3 -3
- package/dist/api/setupRequest.d.ts +1 -2
- package/dist/api/setupRequest.d.ts.map +1 -1
- package/dist/api/setupRequest.js +3 -3
- package/dist/fileUtil.d.ts +23 -0
- package/dist/fileUtil.d.ts.map +1 -0
- package/dist/fileUtil.js +41 -0
- package/dist/logger/shared.d.ts.map +1 -1
- package/dist/logger/shared.js +2 -2
- package/dist/services/CUPS.d.ts +26 -0
- package/dist/services/CUPS.d.ts.map +1 -0
- package/dist/services/CUPS.js +111 -0
- package/dist/services/QueueMaker/SQLQueue.d.ts.map +1 -1
- package/dist/services/QueueMaker/SQLQueue.js +2 -2
- package/dist/services/QueueMaker/memQueue.d.ts +1 -1
- package/dist/services/QueueMaker/memQueue.d.ts.map +1 -1
- package/dist/services/QueueMaker/memQueue.js +2 -2
- package/dist/services/QueueMaker/sbqueue.d.ts +3 -3
- package/dist/services/QueueMaker/sbqueue.d.ts.map +1 -1
- package/dist/services/QueueMaker/sbqueue.js +2 -2
- package/dist/services/Store/Cosmos.d.ts.map +1 -1
- package/dist/services/Store/Cosmos.js +2 -2
- package/dist/services/Store/Disk.js +2 -2
- package/dist/services/adapters/SQL/Model.d.ts +538 -0
- package/dist/services/adapters/SQL/Model.d.ts.map +1 -0
- package/dist/services/adapters/SQL/Model.js +508 -0
- package/dist/services/adapters/SQL.d.ts +2 -0
- package/dist/services/adapters/SQL.d.ts.map +1 -0
- package/dist/services/adapters/SQL.js +2 -0
- package/dist/services/adapters/ServiceBus.d.ts +50 -0
- package/dist/services/adapters/ServiceBus.d.ts.map +1 -0
- package/dist/services/adapters/ServiceBus.js +73 -0
- package/dist/services/adapters/cosmos-client.d.ts +10 -0
- package/dist/services/adapters/cosmos-client.d.ts.map +1 -0
- package/dist/services/adapters/cosmos-client.js +8 -0
- package/dist/services/adapters/index.d.ts +2 -0
- package/dist/services/adapters/index.d.ts.map +1 -0
- package/dist/services/adapters/index.js +2 -0
- package/dist/services/adapters/logger.d.ts +8 -0
- package/dist/services/adapters/logger.d.ts.map +1 -0
- package/dist/services/adapters/logger.js +3 -0
- package/dist/services/adapters/memQueue.d.ts +34 -0
- package/dist/services/adapters/memQueue.d.ts.map +1 -0
- package/dist/services/adapters/memQueue.js +24 -0
- package/dist/services/adapters/mongo-client.d.ts +10 -0
- package/dist/services/adapters/mongo-client.d.ts.map +1 -0
- package/dist/services/adapters/mongo-client.js +12 -0
- package/dist/services/adapters/redis-client.d.ts +29 -0
- package/dist/services/adapters/redis-client.d.ts.map +1 -0
- package/dist/services/adapters/redis-client.js +93 -0
- package/package.json +128 -12
- package/src/api/internal/RequestContextMiddleware.ts +2 -3
- package/src/api/internal/events.ts +2 -2
- package/src/api/setupRequest.ts +2 -3
- package/src/fileUtil.ts +85 -0
- package/src/logger/shared.ts +2 -3
- package/src/services/CUPS.ts +151 -0
- package/src/services/QueueMaker/SQLQueue.ts +1 -1
- package/src/services/QueueMaker/memQueue.ts +1 -1
- package/src/services/QueueMaker/sbqueue.ts +7 -7
- package/src/services/Store/Cosmos.ts +1 -1
- package/src/services/Store/Disk.ts +1 -1
- package/src/services/adapters/SQL/Model.ts +939 -0
- package/src/services/adapters/SQL.ts +1 -0
- package/src/services/adapters/ServiceBus.ts +140 -0
- package/src/services/adapters/cosmos-client.ts +16 -0
- package/src/services/adapters/index.ts +0 -0
- package/src/services/adapters/logger.ts +3 -0
- package/src/services/adapters/memQueue.ts +26 -0
- package/src/services/adapters/mongo-client.ts +23 -0
- package/src/services/adapters/redis-client.ts +123 -0
- package/tsconfig.src.json +0 -3
- package/src/services/Store/Redis.ts.bak +0 -88
- package/src/services/simpledb/cosmosdb.ts.bak +0 -149
- package/src/services/simpledb/diskdb.ts.bak +0 -165
- package/src/services/simpledb/index.ts.bak +0 -6
- package/src/services/simpledb/memdb.ts.bak +0 -78
- package/src/services/simpledb/mongodb.ts.bak +0 -107
- package/src/services/simpledb/redisdb.ts.bak +0 -202
- package/src/services/simpledb/shared.ts.bak +0 -117
- package/src/services/simpledb/simpledb.ts.bak +0 -121
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
import * as VariantSchema from "@effect/experimental/VariantSchema";
|
|
2
|
+
import { SqlClient } from "@effect/sql/SqlClient";
|
|
3
|
+
import type { Brand } from "effect/Brand";
|
|
4
|
+
import * as DateTime from "effect/DateTime";
|
|
5
|
+
import type { DurationInput } from "effect/Duration";
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Option from "effect/Option";
|
|
8
|
+
import * as Schema from "effect/Schema";
|
|
9
|
+
import type { Scope } from "effect/Scope";
|
|
10
|
+
declare const Class: <Self = never>(identifier: string) => <const Fields extends VariantSchema.Struct.Fields>(fields: Fields & VariantSchema.Struct.Validate<Fields, "select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate">, annotations?: Schema.Annotations.Schema<Self, readonly []> | undefined) => [Self] extends [never] ? "Missing `Self` generic - use `class Self extends Class<Self>()({ ... })`" : VariantSchema.Class<Self, Fields, VariantSchema.ExtractFields<"select", Fields, true> extends infer T ? { [K in keyof T]: VariantSchema.ExtractFields<"select", Fields, true>[K]; } : never, Schema.Struct.Type<VariantSchema.ExtractFields<"select", Fields, true> extends infer T ? { [K in keyof T]: VariantSchema.ExtractFields<"select", Fields, true>[K]; } : never>, Schema.Struct.Encoded<VariantSchema.ExtractFields<"select", Fields, true> extends infer T ? { [K in keyof T]: VariantSchema.ExtractFields<"select", Fields, true>[K]; } : never>, Schema.Schema.Context<(VariantSchema.ExtractFields<"select", Fields, true> extends infer T ? { [K in keyof T]: VariantSchema.ExtractFields<"select", Fields, true>[K]; } : never)[keyof VariantSchema.ExtractFields<"select", Fields, true>]>, Schema.Struct.Constructor<VariantSchema.ExtractFields<"select", Fields, true> extends infer T ? { [K in keyof T]: VariantSchema.ExtractFields<"select", Fields, true>[K]; } : never>> & {
|
|
11
|
+
readonly select: Schema.Struct<VariantSchema.ExtractFields<"select", Fields, false> extends infer T_1 ? { [K_1 in keyof T_1]: VariantSchema.ExtractFields<"select", Fields, false>[K_1]; } : never>;
|
|
12
|
+
readonly json: Schema.Struct<VariantSchema.ExtractFields<"json", Fields, false> extends infer T_2 ? { [K_2 in keyof T_2]: VariantSchema.ExtractFields<"json", Fields, false>[K_2]; } : never>;
|
|
13
|
+
readonly update: Schema.Struct<VariantSchema.ExtractFields<"update", Fields, false> extends infer T_3 ? { [K_3 in keyof T_3]: VariantSchema.ExtractFields<"update", Fields, false>[K_3]; } : never>;
|
|
14
|
+
readonly insert: Schema.Struct<VariantSchema.ExtractFields<"insert", Fields, false> extends infer T_4 ? { [K_4 in keyof T_4]: VariantSchema.ExtractFields<"insert", Fields, false>[K_4]; } : never>;
|
|
15
|
+
readonly jsonCreate: Schema.Struct<VariantSchema.ExtractFields<"jsonCreate", Fields, false> extends infer T_5 ? { [K_5 in keyof T_5]: VariantSchema.ExtractFields<"jsonCreate", Fields, false>[K_5]; } : never>;
|
|
16
|
+
readonly jsonUpdate: Schema.Struct<VariantSchema.ExtractFields<"jsonUpdate", Fields, false> extends infer T_6 ? { [K_6 in keyof T_6]: VariantSchema.ExtractFields<"jsonUpdate", Fields, false>[K_6]; } : never>;
|
|
17
|
+
}, Field: <const A extends VariantSchema.Field.ConfigWithKeys<"select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate">>(config: A & { readonly [K in Exclude<keyof A, "select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate">]: never; }) => VariantSchema.Field<A>, FieldExcept: <const Keys extends readonly ("select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate")[]>(...keys: Keys) => <S extends Schema.Schema.All | Schema.PropertySignature.All>(schema: S) => VariantSchema.Field<{ readonly [K in Exclude<"select", Keys[number]> | Exclude<"json", Keys[number]> | Exclude<"update", Keys[number]> | Exclude<"insert", Keys[number]> | Exclude<"jsonCreate", Keys[number]> | Exclude<"jsonUpdate", Keys[number]>]: S; }>, FieldOnly: <const Keys extends readonly ("select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate")[]>(...keys: Keys) => <S extends Schema.Schema.All | Schema.PropertySignature.All>(schema: S) => VariantSchema.Field<{ readonly [K in Keys[number]]: S; }>, Struct: <const A extends VariantSchema.Struct.Fields>(fields: A & VariantSchema.Struct.Validate<A, "select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate">) => VariantSchema.Struct<A>, Union: <const Members extends ReadonlyArray<VariantSchema.Struct<any>>>(...members: Members) => VariantSchema.Union<Members> & VariantSchema.Union.Variants<Members, "select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate">, extract: {
|
|
18
|
+
<V extends "select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate">(variant: V): <A extends VariantSchema.Struct<any>>(self: A) => VariantSchema.Extract<V, A, V extends "select" ? true : false>;
|
|
19
|
+
<V extends "select" | "json" | "update" | "insert" | "jsonCreate" | "jsonUpdate", A extends VariantSchema.Struct<any>>(self: A, variant: V): VariantSchema.Extract<V, A, V extends "select" ? true : false>;
|
|
20
|
+
}, fieldEvolve: {
|
|
21
|
+
<Self extends VariantSchema.Field<any> | VariantSchema.Field.ValueAny, const Mapping extends Self extends VariantSchema.Field<infer S extends VariantSchema.Field.Config> ? { readonly [K in keyof S]?: (variant: S[K]) => VariantSchema.Field.ValueAny; } : {
|
|
22
|
+
readonly select?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
23
|
+
readonly json?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
24
|
+
readonly update?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
25
|
+
readonly insert?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
26
|
+
readonly jsonCreate?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
27
|
+
readonly jsonUpdate?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
28
|
+
}>(f: Mapping): (self: Self) => VariantSchema.Field<Self extends VariantSchema.Field<infer S_1 extends VariantSchema.Field.Config> ? { readonly [K_1 in keyof S_1]: K_1 extends keyof Mapping ? Mapping[K_1] extends (arg: any) => any ? ReturnType<Mapping[K_1]> : S_1[K_1] : S_1[K_1]; } : {
|
|
29
|
+
readonly select: "select" extends infer T ? T extends "select" ? T extends keyof Mapping ? Mapping[T] extends (arg: any) => any ? ReturnType<Mapping[T]> : Self : Self : never : never;
|
|
30
|
+
readonly json: "json" extends infer T_1 ? T_1 extends "json" ? T_1 extends keyof Mapping ? Mapping[T_1] extends (arg: any) => any ? ReturnType<Mapping[T_1]> : Self : Self : never : never;
|
|
31
|
+
readonly update: "update" extends infer T_2 ? T_2 extends "update" ? T_2 extends keyof Mapping ? Mapping[T_2] extends (arg: any) => any ? ReturnType<Mapping[T_2]> : Self : Self : never : never;
|
|
32
|
+
readonly insert: "insert" extends infer T_3 ? T_3 extends "insert" ? T_3 extends keyof Mapping ? Mapping[T_3] extends (arg: any) => any ? ReturnType<Mapping[T_3]> : Self : Self : never : never;
|
|
33
|
+
readonly jsonCreate: "jsonCreate" extends infer T_4 ? T_4 extends "jsonCreate" ? T_4 extends keyof Mapping ? Mapping[T_4] extends (arg: any) => any ? ReturnType<Mapping[T_4]> : Self : Self : never : never;
|
|
34
|
+
readonly jsonUpdate: "jsonUpdate" extends infer T_5 ? T_5 extends "jsonUpdate" ? T_5 extends keyof Mapping ? Mapping[T_5] extends (arg: any) => any ? ReturnType<Mapping[T_5]> : Self : Self : never : never;
|
|
35
|
+
}>;
|
|
36
|
+
<Self extends VariantSchema.Field<any> | VariantSchema.Field.ValueAny, const Mapping_1 extends Self extends VariantSchema.Field<infer S extends VariantSchema.Field.Config> ? { readonly [K in keyof S]?: (variant: S[K]) => VariantSchema.Field.ValueAny; } : {
|
|
37
|
+
readonly select?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
38
|
+
readonly json?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
39
|
+
readonly update?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
40
|
+
readonly insert?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
41
|
+
readonly jsonCreate?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
42
|
+
readonly jsonUpdate?: (variant: Self) => VariantSchema.Field.ValueAny;
|
|
43
|
+
}>(self: Self, f: Mapping_1): VariantSchema.Field<Self extends VariantSchema.Field<infer S_1 extends VariantSchema.Field.Config> ? { readonly [K_1 in keyof S_1]: K_1 extends keyof Mapping_1 ? Mapping_1[K_1] extends (arg: any) => any ? ReturnType<Mapping_1[K_1]> : S_1[K_1] : S_1[K_1]; } : {
|
|
44
|
+
readonly select: "select" extends infer T ? T extends "select" ? T extends keyof Mapping_1 ? Mapping_1[T] extends (arg: any) => any ? ReturnType<Mapping_1[T]> : Self : Self : never : never;
|
|
45
|
+
readonly json: "json" extends infer T_1 ? T_1 extends "json" ? T_1 extends keyof Mapping_1 ? Mapping_1[T_1] extends (arg: any) => any ? ReturnType<Mapping_1[T_1]> : Self : Self : never : never;
|
|
46
|
+
readonly update: "update" extends infer T_2 ? T_2 extends "update" ? T_2 extends keyof Mapping_1 ? Mapping_1[T_2] extends (arg: any) => any ? ReturnType<Mapping_1[T_2]> : Self : Self : never : never;
|
|
47
|
+
readonly insert: "insert" extends infer T_3 ? T_3 extends "insert" ? T_3 extends keyof Mapping_1 ? Mapping_1[T_3] extends (arg: any) => any ? ReturnType<Mapping_1[T_3]> : Self : Self : never : never;
|
|
48
|
+
readonly jsonCreate: "jsonCreate" extends infer T_4 ? T_4 extends "jsonCreate" ? T_4 extends keyof Mapping_1 ? Mapping_1[T_4] extends (arg: any) => any ? ReturnType<Mapping_1[T_4]> : Self : Self : never : never;
|
|
49
|
+
readonly jsonUpdate: "jsonUpdate" extends infer T_5 ? T_5 extends "jsonUpdate" ? T_5 extends keyof Mapping_1 ? Mapping_1[T_5] extends (arg: any) => any ? ReturnType<Mapping_1[T_5]> : Self : Self : never : never;
|
|
50
|
+
}>;
|
|
51
|
+
}, fieldFromKey: {
|
|
52
|
+
<Self extends VariantSchema.Field<any> | VariantSchema.Field.ValueAny, const Mapping_2 extends Self extends VariantSchema.Field<infer S extends VariantSchema.Field.Config> ? { readonly [K in keyof S]?: string; } : {
|
|
53
|
+
readonly select?: string;
|
|
54
|
+
readonly json?: string;
|
|
55
|
+
readonly update?: string;
|
|
56
|
+
readonly insert?: string;
|
|
57
|
+
readonly jsonCreate?: string;
|
|
58
|
+
readonly jsonUpdate?: string;
|
|
59
|
+
}>(mapping: Mapping_2): (self: Self) => VariantSchema.Field<Self extends VariantSchema.Field<infer S_1 extends VariantSchema.Field.Config> ? { readonly [K_1 in keyof S_1]: K_1 extends keyof Mapping_2 ? Mapping_2[K_1] extends string ? VariantSchema.fromKey.Rename<S_1[K_1], Mapping_2[K_1]> : S_1[K_1] : S_1[K_1]; } : {
|
|
60
|
+
readonly select: "select" extends infer T ? T extends "select" ? T extends keyof Mapping_2 ? Mapping_2[T] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_2[T]> : Self : Self : never : never;
|
|
61
|
+
readonly json: "json" extends infer T_1 ? T_1 extends "json" ? T_1 extends keyof Mapping_2 ? Mapping_2[T_1] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_2[T_1]> : Self : Self : never : never;
|
|
62
|
+
readonly update: "update" extends infer T_2 ? T_2 extends "update" ? T_2 extends keyof Mapping_2 ? Mapping_2[T_2] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_2[T_2]> : Self : Self : never : never;
|
|
63
|
+
readonly insert: "insert" extends infer T_3 ? T_3 extends "insert" ? T_3 extends keyof Mapping_2 ? Mapping_2[T_3] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_2[T_3]> : Self : Self : never : never;
|
|
64
|
+
readonly jsonCreate: "jsonCreate" extends infer T_4 ? T_4 extends "jsonCreate" ? T_4 extends keyof Mapping_2 ? Mapping_2[T_4] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_2[T_4]> : Self : Self : never : never;
|
|
65
|
+
readonly jsonUpdate: "jsonUpdate" extends infer T_5 ? T_5 extends "jsonUpdate" ? T_5 extends keyof Mapping_2 ? Mapping_2[T_5] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_2[T_5]> : Self : Self : never : never;
|
|
66
|
+
}>;
|
|
67
|
+
<Self extends VariantSchema.Field<any> | VariantSchema.Field.ValueAny, const Mapping_3 extends Self extends VariantSchema.Field<infer S extends VariantSchema.Field.Config> ? { readonly [K in keyof S]?: string; } : {
|
|
68
|
+
readonly select?: string;
|
|
69
|
+
readonly json?: string;
|
|
70
|
+
readonly update?: string;
|
|
71
|
+
readonly insert?: string;
|
|
72
|
+
readonly jsonCreate?: string;
|
|
73
|
+
readonly jsonUpdate?: string;
|
|
74
|
+
}>(self: Self, mapping: Mapping_3): VariantSchema.Field<Self extends VariantSchema.Field<infer S_1 extends VariantSchema.Field.Config> ? { readonly [K_1 in keyof S_1]: K_1 extends keyof Mapping_3 ? Mapping_3[K_1] extends string ? VariantSchema.fromKey.Rename<S_1[K_1], Mapping_3[K_1]> : S_1[K_1] : S_1[K_1]; } : {
|
|
75
|
+
readonly select: "select" extends infer T ? T extends "select" ? T extends keyof Mapping_3 ? Mapping_3[T] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_3[T]> : Self : Self : never : never;
|
|
76
|
+
readonly json: "json" extends infer T_1 ? T_1 extends "json" ? T_1 extends keyof Mapping_3 ? Mapping_3[T_1] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_3[T_1]> : Self : Self : never : never;
|
|
77
|
+
readonly update: "update" extends infer T_2 ? T_2 extends "update" ? T_2 extends keyof Mapping_3 ? Mapping_3[T_2] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_3[T_2]> : Self : Self : never : never;
|
|
78
|
+
readonly insert: "insert" extends infer T_3 ? T_3 extends "insert" ? T_3 extends keyof Mapping_3 ? Mapping_3[T_3] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_3[T_3]> : Self : Self : never : never;
|
|
79
|
+
readonly jsonCreate: "jsonCreate" extends infer T_4 ? T_4 extends "jsonCreate" ? T_4 extends keyof Mapping_3 ? Mapping_3[T_4] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_3[T_4]> : Self : Self : never : never;
|
|
80
|
+
readonly jsonUpdate: "jsonUpdate" extends infer T_5 ? T_5 extends "jsonUpdate" ? T_5 extends keyof Mapping_3 ? Mapping_3[T_5] extends string ? VariantSchema.fromKey.Rename<Self, Mapping_3[T_5]> : Self : Self : never : never;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* @since 1.0.0
|
|
85
|
+
* @category models
|
|
86
|
+
*/
|
|
87
|
+
export type Any = Schema.Schema.Any & {
|
|
88
|
+
readonly fields: Schema.Struct.Fields;
|
|
89
|
+
readonly insert: Schema.Schema.Any;
|
|
90
|
+
readonly update: Schema.Schema.Any;
|
|
91
|
+
readonly json: Schema.Schema.Any;
|
|
92
|
+
readonly jsonCreate: Schema.Schema.Any;
|
|
93
|
+
readonly jsonUpdate: Schema.Schema.Any;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @since 1.0.0
|
|
97
|
+
* @category models
|
|
98
|
+
*/
|
|
99
|
+
export type AnyNoContext = Schema.Schema.AnyNoContext & {
|
|
100
|
+
readonly fields: Schema.Struct.Fields;
|
|
101
|
+
readonly insert: Schema.Schema.AnyNoContext;
|
|
102
|
+
readonly update: Schema.Schema.AnyNoContext;
|
|
103
|
+
readonly json: Schema.Schema.AnyNoContext;
|
|
104
|
+
readonly jsonCreate: Schema.Schema.AnyNoContext;
|
|
105
|
+
readonly jsonUpdate: Schema.Schema.AnyNoContext;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* @since 1.0.0
|
|
109
|
+
* @category models
|
|
110
|
+
*/
|
|
111
|
+
export type VariantsDatabase = "select" | "insert" | "update";
|
|
112
|
+
/**
|
|
113
|
+
* @since 1.0.0
|
|
114
|
+
* @category models
|
|
115
|
+
*/
|
|
116
|
+
export type VariantsJson = "json" | "jsonCreate" | "jsonUpdate";
|
|
117
|
+
export {
|
|
118
|
+
/**
|
|
119
|
+
* A base class used for creating domain model schemas.
|
|
120
|
+
*
|
|
121
|
+
* It supports common variants for database and JSON apis.
|
|
122
|
+
*
|
|
123
|
+
* @since 1.0.0
|
|
124
|
+
* @category constructors
|
|
125
|
+
* @example
|
|
126
|
+
* import { Schema } from "effect/Schema"
|
|
127
|
+
* import { Model } from "@effect/sql"
|
|
128
|
+
*
|
|
129
|
+
* export const GroupId = Schema.Number.pipe(Schema.brand("GroupId"))
|
|
130
|
+
*
|
|
131
|
+
* export class Group extends Model.Class<Group>("Group")({
|
|
132
|
+
* id: Model.Generated(GroupId),
|
|
133
|
+
* name: Schema.NonEmptyTrimmedString,
|
|
134
|
+
* createdAt: Model.DateTimeInsertFromDate,
|
|
135
|
+
* updatedAt: Model.DateTimeUpdateFromDate
|
|
136
|
+
* }) {}
|
|
137
|
+
*
|
|
138
|
+
* // schema used for selects
|
|
139
|
+
* Group
|
|
140
|
+
*
|
|
141
|
+
* // schema used for inserts
|
|
142
|
+
* Group.insert
|
|
143
|
+
*
|
|
144
|
+
* // schema used for updates
|
|
145
|
+
* Group.update
|
|
146
|
+
*
|
|
147
|
+
* // schema used for json api
|
|
148
|
+
* Group.json
|
|
149
|
+
* Group.jsonCreate
|
|
150
|
+
* Group.jsonUpdate
|
|
151
|
+
*
|
|
152
|
+
* // you can also turn them into classes
|
|
153
|
+
* class GroupJson extends Schema.Class<GroupJson>("GroupJson")(Group.json) {
|
|
154
|
+
* get upperName() {
|
|
155
|
+
* return this.name.toUpperCase()
|
|
156
|
+
* }
|
|
157
|
+
* }
|
|
158
|
+
*/
|
|
159
|
+
Class,
|
|
160
|
+
/**
|
|
161
|
+
* @since 1.0.0
|
|
162
|
+
* @category extraction
|
|
163
|
+
*/
|
|
164
|
+
extract,
|
|
165
|
+
/**
|
|
166
|
+
* @since 1.0.0
|
|
167
|
+
* @category fields
|
|
168
|
+
*/
|
|
169
|
+
Field,
|
|
170
|
+
/**
|
|
171
|
+
* @since 1.0.0
|
|
172
|
+
* @category fields
|
|
173
|
+
*/
|
|
174
|
+
fieldEvolve,
|
|
175
|
+
/**
|
|
176
|
+
* @since 1.0.0
|
|
177
|
+
* @category fields
|
|
178
|
+
*/
|
|
179
|
+
FieldExcept,
|
|
180
|
+
/**
|
|
181
|
+
* @since 1.0.0
|
|
182
|
+
* @category fields
|
|
183
|
+
*/
|
|
184
|
+
fieldFromKey,
|
|
185
|
+
/**
|
|
186
|
+
* @since 1.0.0
|
|
187
|
+
* @category fields
|
|
188
|
+
*/
|
|
189
|
+
FieldOnly,
|
|
190
|
+
/**
|
|
191
|
+
* @since 1.0.0
|
|
192
|
+
* @category constructors
|
|
193
|
+
*/
|
|
194
|
+
Struct,
|
|
195
|
+
/**
|
|
196
|
+
* @since 1.0.0
|
|
197
|
+
* @category constructors
|
|
198
|
+
*/
|
|
199
|
+
Union };
|
|
200
|
+
/**
|
|
201
|
+
* @since 1.0.0
|
|
202
|
+
* @category fields
|
|
203
|
+
*/
|
|
204
|
+
export declare const fields: <A extends VariantSchema.Struct<any>>(self: A) => A[VariantSchema.TypeId];
|
|
205
|
+
/**
|
|
206
|
+
* @since 1.0.0
|
|
207
|
+
* @category overrideable
|
|
208
|
+
*/
|
|
209
|
+
export declare const Override: <A>(value: A) => A & Brand<"Override">;
|
|
210
|
+
/**
|
|
211
|
+
* @since 1.0.0
|
|
212
|
+
* @category generated
|
|
213
|
+
*/
|
|
214
|
+
export interface Generated<S extends Schema.Schema.All | Schema.PropertySignature.All> extends VariantSchema.Field<{
|
|
215
|
+
readonly select: S;
|
|
216
|
+
readonly update: S;
|
|
217
|
+
readonly json: S;
|
|
218
|
+
}> {
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* A field that represents a column that is generated by the database.
|
|
222
|
+
*
|
|
223
|
+
* It is available for selection and update, but not for insertion.
|
|
224
|
+
*
|
|
225
|
+
* @since 1.0.0
|
|
226
|
+
* @category generated
|
|
227
|
+
*/
|
|
228
|
+
export declare const Generated: <S extends Schema.Schema.All | Schema.PropertySignature.All>(schema: S) => Generated<S>;
|
|
229
|
+
/**
|
|
230
|
+
* @since 1.0.0
|
|
231
|
+
* @category generated
|
|
232
|
+
*/
|
|
233
|
+
export interface GeneratedByApp<S extends Schema.Schema.All | Schema.PropertySignature.All> extends VariantSchema.Field<{
|
|
234
|
+
readonly select: S;
|
|
235
|
+
readonly insert: S;
|
|
236
|
+
readonly update: S;
|
|
237
|
+
readonly json: S;
|
|
238
|
+
}> {
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* A field that represents a column that is generated by the application.
|
|
242
|
+
*
|
|
243
|
+
* It is required by the database, but not by the JSON variants.
|
|
244
|
+
*
|
|
245
|
+
* @since 1.0.0
|
|
246
|
+
* @category generated
|
|
247
|
+
*/
|
|
248
|
+
export declare const GeneratedByApp: <S extends Schema.Schema.All | Schema.PropertySignature.All>(schema: S) => GeneratedByApp<S>;
|
|
249
|
+
/**
|
|
250
|
+
* @since 1.0.0
|
|
251
|
+
* @category sensitive
|
|
252
|
+
*/
|
|
253
|
+
export interface Sensitive<S extends Schema.Schema.All | Schema.PropertySignature.All> extends VariantSchema.Field<{
|
|
254
|
+
readonly select: S;
|
|
255
|
+
readonly insert: S;
|
|
256
|
+
readonly update: S;
|
|
257
|
+
}> {
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* A field that represents a sensitive value that should not be exposed in the
|
|
261
|
+
* JSON variants.
|
|
262
|
+
*
|
|
263
|
+
* @since 1.0.0
|
|
264
|
+
* @category sensitive
|
|
265
|
+
*/
|
|
266
|
+
export declare const Sensitive: <S extends Schema.Schema.All | Schema.PropertySignature.All>(schema: S) => Sensitive<S>;
|
|
267
|
+
/**
|
|
268
|
+
* Convert a field to one that is optional for all variants.
|
|
269
|
+
*
|
|
270
|
+
* For the database variants, it will accept `null`able values.
|
|
271
|
+
* For the JSON variants, it will also accept missing keys.
|
|
272
|
+
*
|
|
273
|
+
* @since 1.0.0
|
|
274
|
+
* @category optional
|
|
275
|
+
*/
|
|
276
|
+
export interface FieldOption<S extends Schema.Schema.Any> extends VariantSchema.Field<{
|
|
277
|
+
readonly select: Schema.OptionFromNullOr<S>;
|
|
278
|
+
readonly insert: Schema.OptionFromNullOr<S>;
|
|
279
|
+
readonly update: Schema.OptionFromNullOr<S>;
|
|
280
|
+
readonly json: Schema.optionalWith<S, {
|
|
281
|
+
as: "Option";
|
|
282
|
+
}>;
|
|
283
|
+
readonly jsonCreate: Schema.optionalWith<S, {
|
|
284
|
+
as: "Option";
|
|
285
|
+
nullable: true;
|
|
286
|
+
}>;
|
|
287
|
+
readonly jsonUpdate: Schema.optionalWith<S, {
|
|
288
|
+
as: "Option";
|
|
289
|
+
nullable: true;
|
|
290
|
+
}>;
|
|
291
|
+
}> {
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Convert a field to one that is optional for all variants.
|
|
295
|
+
*
|
|
296
|
+
* For the database variants, it will accept `null`able values.
|
|
297
|
+
* For the JSON variants, it will also accept missing keys.
|
|
298
|
+
*
|
|
299
|
+
* @since 1.0.0
|
|
300
|
+
* @category optional
|
|
301
|
+
*/
|
|
302
|
+
export declare const FieldOption: <Field extends VariantSchema.Field<any> | Schema.Schema.Any>(self: Field) => Field extends Schema.Schema.Any ? FieldOption<Field> : Field extends VariantSchema.Field<infer S> ? VariantSchema.Field<{
|
|
303
|
+
readonly [K in keyof S]: S[K] extends Schema.Schema.Any ? K extends VariantsDatabase ? Schema.OptionFromNullOr<S[K]> : Schema.optionalWith<S[K], {
|
|
304
|
+
as: "Option";
|
|
305
|
+
nullable: true;
|
|
306
|
+
}> : never;
|
|
307
|
+
}> : never;
|
|
308
|
+
/**
|
|
309
|
+
* @since 1.0.0
|
|
310
|
+
* @category date & time
|
|
311
|
+
*/
|
|
312
|
+
export interface DateTimeFromDate extends Schema.transform<typeof Schema.ValidDateFromSelf, typeof Schema.DateTimeUtcFromSelf> {
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* @since 1.0.0
|
|
316
|
+
* @category date & time
|
|
317
|
+
*/
|
|
318
|
+
export declare const DateTimeFromDate: DateTimeFromDate;
|
|
319
|
+
/**
|
|
320
|
+
* @since 1.0.0
|
|
321
|
+
* @category date & time
|
|
322
|
+
*/
|
|
323
|
+
export interface Date extends Schema.transformOrFail<typeof Schema.String, typeof Schema.DateTimeUtcFromSelf> {
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* A schema for a `DateTime.Utc` that is serialized as a date string in the
|
|
327
|
+
* format `YYYY-MM-DD`.
|
|
328
|
+
*
|
|
329
|
+
* @since 1.0.0
|
|
330
|
+
* @category date & time
|
|
331
|
+
*/
|
|
332
|
+
export declare const Date: Date;
|
|
333
|
+
/**
|
|
334
|
+
* @since 1.0.0
|
|
335
|
+
* @category date & time
|
|
336
|
+
*/
|
|
337
|
+
export declare const DateWithNow: VariantSchema.Overrideable<DateTime.Utc, string, never>;
|
|
338
|
+
/**
|
|
339
|
+
* @since 1.0.0
|
|
340
|
+
* @category date & time
|
|
341
|
+
*/
|
|
342
|
+
export declare const DateTimeWithNow: VariantSchema.Overrideable<DateTime.Utc, string, never>;
|
|
343
|
+
/**
|
|
344
|
+
* @since 1.0.0
|
|
345
|
+
* @category date & time
|
|
346
|
+
*/
|
|
347
|
+
export declare const DateTimeFromDateWithNow: VariantSchema.Overrideable<DateTime.Utc, globalThis.Date, never>;
|
|
348
|
+
/**
|
|
349
|
+
* @since 1.0.0
|
|
350
|
+
* @category date & time
|
|
351
|
+
*/
|
|
352
|
+
export declare const DateTimeFromNumberWithNow: VariantSchema.Overrideable<DateTime.Utc, number, never>;
|
|
353
|
+
/**
|
|
354
|
+
* @since 1.0.0
|
|
355
|
+
* @category date & time
|
|
356
|
+
*/
|
|
357
|
+
export interface DateTimeInsert extends VariantSchema.Field<{
|
|
358
|
+
readonly select: typeof Schema.DateTimeUtc;
|
|
359
|
+
readonly insert: VariantSchema.Overrideable<DateTime.Utc, string>;
|
|
360
|
+
readonly json: typeof Schema.DateTimeUtc;
|
|
361
|
+
}> {
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* A field that represents a date-time value that is inserted as the current
|
|
365
|
+
* `DateTime.Utc`. It is serialized as a string for the database.
|
|
366
|
+
*
|
|
367
|
+
* It is omitted from updates and is available for selection.
|
|
368
|
+
*
|
|
369
|
+
* @since 1.0.0
|
|
370
|
+
* @category date & time
|
|
371
|
+
*/
|
|
372
|
+
export declare const DateTimeInsert: DateTimeInsert;
|
|
373
|
+
/**
|
|
374
|
+
* @since 1.0.0
|
|
375
|
+
* @category date & time
|
|
376
|
+
*/
|
|
377
|
+
export interface DateTimeInsertFromDate extends VariantSchema.Field<{
|
|
378
|
+
readonly select: DateTimeFromDate;
|
|
379
|
+
readonly insert: VariantSchema.Overrideable<DateTime.Utc, globalThis.Date>;
|
|
380
|
+
readonly json: typeof Schema.DateTimeUtc;
|
|
381
|
+
}> {
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* A field that represents a date-time value that is inserted as the current
|
|
385
|
+
* `DateTime.Utc`. It is serialized as a `Date` for the database.
|
|
386
|
+
*
|
|
387
|
+
* It is omitted from updates and is available for selection.
|
|
388
|
+
*
|
|
389
|
+
* @since 1.0.0
|
|
390
|
+
* @category date & time
|
|
391
|
+
*/
|
|
392
|
+
export declare const DateTimeInsertFromDate: DateTimeInsertFromDate;
|
|
393
|
+
/**
|
|
394
|
+
* @since 1.0.0
|
|
395
|
+
* @category date & time
|
|
396
|
+
*/
|
|
397
|
+
export interface DateTimeInsertFromNumber extends VariantSchema.Field<{
|
|
398
|
+
readonly select: typeof Schema.DateTimeUtcFromNumber;
|
|
399
|
+
readonly insert: VariantSchema.Overrideable<DateTime.Utc, number>;
|
|
400
|
+
readonly json: typeof Schema.DateTimeUtcFromNumber;
|
|
401
|
+
}> {
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* A field that represents a date-time value that is inserted as the current
|
|
405
|
+
* `DateTime.Utc`. It is serialized as a `number`.
|
|
406
|
+
*
|
|
407
|
+
* It is omitted from updates and is available for selection.
|
|
408
|
+
*
|
|
409
|
+
* @since 1.0.0
|
|
410
|
+
* @category date & time
|
|
411
|
+
*/
|
|
412
|
+
export declare const DateTimeInsertFromNumber: DateTimeInsertFromNumber;
|
|
413
|
+
/**
|
|
414
|
+
* @since 1.0.0
|
|
415
|
+
* @category date & time
|
|
416
|
+
*/
|
|
417
|
+
export interface DateTimeUpdate extends VariantSchema.Field<{
|
|
418
|
+
readonly select: typeof Schema.DateTimeUtc;
|
|
419
|
+
readonly insert: VariantSchema.Overrideable<DateTime.Utc, string>;
|
|
420
|
+
readonly update: VariantSchema.Overrideable<DateTime.Utc, string>;
|
|
421
|
+
readonly json: typeof Schema.DateTimeUtc;
|
|
422
|
+
}> {
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* A field that represents a date-time value that is updated as the current
|
|
426
|
+
* `DateTime.Utc`. It is serialized as a string for the database.
|
|
427
|
+
*
|
|
428
|
+
* It is set to the current `DateTime.Utc` on updates and inserts and is
|
|
429
|
+
* available for selection.
|
|
430
|
+
*
|
|
431
|
+
* @since 1.0.0
|
|
432
|
+
* @category date & time
|
|
433
|
+
*/
|
|
434
|
+
export declare const DateTimeUpdate: DateTimeUpdate;
|
|
435
|
+
/**
|
|
436
|
+
* @since 1.0.0
|
|
437
|
+
* @category date & time
|
|
438
|
+
*/
|
|
439
|
+
export interface DateTimeUpdateFromDate extends VariantSchema.Field<{
|
|
440
|
+
readonly select: DateTimeFromDate;
|
|
441
|
+
readonly insert: VariantSchema.Overrideable<DateTime.Utc, globalThis.Date>;
|
|
442
|
+
readonly update: VariantSchema.Overrideable<DateTime.Utc, globalThis.Date>;
|
|
443
|
+
readonly json: typeof Schema.DateTimeUtc;
|
|
444
|
+
}> {
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* A field that represents a date-time value that is updated as the current
|
|
448
|
+
* `DateTime.Utc`. It is serialized as a `Date` for the database.
|
|
449
|
+
*
|
|
450
|
+
* It is set to the current `DateTime.Utc` on updates and inserts and is
|
|
451
|
+
* available for selection.
|
|
452
|
+
*
|
|
453
|
+
* @since 1.0.0
|
|
454
|
+
* @category date & time
|
|
455
|
+
*/
|
|
456
|
+
export declare const DateTimeUpdateFromDate: DateTimeUpdateFromDate;
|
|
457
|
+
/**
|
|
458
|
+
* @since 1.0.0
|
|
459
|
+
* @category date & time
|
|
460
|
+
*/
|
|
461
|
+
export interface DateTimeUpdateFromNumber extends VariantSchema.Field<{
|
|
462
|
+
readonly select: typeof Schema.DateTimeUtcFromNumber;
|
|
463
|
+
readonly insert: VariantSchema.Overrideable<DateTime.Utc, number>;
|
|
464
|
+
readonly update: VariantSchema.Overrideable<DateTime.Utc, number>;
|
|
465
|
+
readonly json: typeof Schema.DateTimeUtcFromNumber;
|
|
466
|
+
}> {
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* A field that represents a date-time value that is updated as the current
|
|
470
|
+
* `DateTime.Utc`. It is serialized as a `number`.
|
|
471
|
+
*
|
|
472
|
+
* It is set to the current `DateTime.Utc` on updates and inserts and is
|
|
473
|
+
* available for selection.
|
|
474
|
+
*
|
|
475
|
+
* @since 1.0.0
|
|
476
|
+
* @category date & time
|
|
477
|
+
*/
|
|
478
|
+
export declare const DateTimeUpdateFromNumber: DateTimeUpdateFromNumber;
|
|
479
|
+
/**
|
|
480
|
+
* @since 1.0.0
|
|
481
|
+
* @category json
|
|
482
|
+
*/
|
|
483
|
+
export interface JsonFromString<S extends Schema.Schema.All | Schema.PropertySignature.All> extends VariantSchema.Field<{
|
|
484
|
+
readonly select: Schema.Schema<Schema.Schema.Type<S>, string, Schema.Schema.Context<S>>;
|
|
485
|
+
readonly insert: Schema.Schema<Schema.Schema.Type<S>, string, Schema.Schema.Context<S>>;
|
|
486
|
+
readonly update: Schema.Schema<Schema.Schema.Type<S>, string, Schema.Schema.Context<S>>;
|
|
487
|
+
readonly json: S;
|
|
488
|
+
readonly jsonCreate: S;
|
|
489
|
+
readonly jsonUpdate: S;
|
|
490
|
+
}> {
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* A field that represents a JSON value stored as text in the database.
|
|
494
|
+
*
|
|
495
|
+
* The "json" variants will use the object schema directly.
|
|
496
|
+
*
|
|
497
|
+
* @since 1.0.0
|
|
498
|
+
* @category json
|
|
499
|
+
*/
|
|
500
|
+
export declare const JsonFromString: <S extends Schema.Schema.All | Schema.PropertySignature.All>(schema: S) => JsonFromString<S>;
|
|
501
|
+
/**
|
|
502
|
+
* Create a simple CRUD repository from a model.
|
|
503
|
+
*
|
|
504
|
+
* @since 1.0.0
|
|
505
|
+
* @category repository
|
|
506
|
+
*/
|
|
507
|
+
export declare const makeRepository: <S extends Any, Id extends (keyof S["Type"]) & (keyof S["update"]["Type"]) & (keyof S["fields"])>(Model: S, options: {
|
|
508
|
+
readonly tableName: string;
|
|
509
|
+
readonly spanPrefix: string;
|
|
510
|
+
readonly idColumn: Id;
|
|
511
|
+
readonly versionColumn?: string | undefined;
|
|
512
|
+
}) => Effect.Effect<{
|
|
513
|
+
readonly insert: (insert: S["insert"]["Type"]) => Effect.Effect<S["Type"], never, S["Context"] | S["insert"]["Context"]>;
|
|
514
|
+
readonly insertVoid: (insert: S["insert"]["Type"]) => Effect.Effect<void, never, S["Context"] | S["insert"]["Context"]>;
|
|
515
|
+
readonly update: (update: S["update"]["Type"]) => Effect.Effect<S["Type"], never, S["Context"] | S["update"]["Context"]>;
|
|
516
|
+
readonly updateVoid: (update: S["update"]["Type"]) => Effect.Effect<void, never, S["Context"] | S["update"]["Context"]>;
|
|
517
|
+
readonly findById: (id: Schema.Schema.Type<S["fields"][Id]>) => Effect.Effect<Option.Option<S["Type"]>, never, S["Context"] | Schema.Schema.Context<S["fields"][Id]>>;
|
|
518
|
+
readonly delete: (id: Schema.Schema.Type<S["fields"][Id]>) => Effect.Effect<void, never, Schema.Schema.Context<S["fields"][Id]>>;
|
|
519
|
+
}, never, SqlClient>;
|
|
520
|
+
/**
|
|
521
|
+
* Create some simple data loaders from a model.
|
|
522
|
+
*
|
|
523
|
+
* @since 1.0.0
|
|
524
|
+
* @category repository
|
|
525
|
+
*/
|
|
526
|
+
export declare const makeDataLoaders: <S extends AnyNoContext, Id extends (keyof S["Type"]) & (keyof S["update"]["Type"]) & (keyof S["fields"])>(Model: S, options: {
|
|
527
|
+
readonly tableName: string;
|
|
528
|
+
readonly spanPrefix: string;
|
|
529
|
+
readonly idColumn: Id;
|
|
530
|
+
readonly window: DurationInput;
|
|
531
|
+
readonly maxBatchSize?: number | undefined;
|
|
532
|
+
}) => Effect.Effect<{
|
|
533
|
+
readonly insert: (insert: S["insert"]["Type"]) => Effect.Effect<S["Type"]>;
|
|
534
|
+
readonly insertVoid: (insert: S["insert"]["Type"]) => Effect.Effect<void>;
|
|
535
|
+
readonly findById: (id: Schema.Schema.Type<S["fields"][Id]>) => Effect.Effect<Option.Option<S["Type"]>>;
|
|
536
|
+
readonly delete: (id: Schema.Schema.Type<S["fields"][Id]>) => Effect.Effect<void>;
|
|
537
|
+
}, never, SqlClient | Scope>;
|
|
538
|
+
//# sourceMappingURL=Model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../../../src/services/adapters/SQL/Model.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,aA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