@ddd-ts-kit/drizzle 0.1.0 → 0.2.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 +6 -6
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -71,8 +71,8 @@ import {
|
|
|
71
71
|
DrizzleOutboxStore,
|
|
72
72
|
DrizzleProcessedEventStore,
|
|
73
73
|
} from '@ddd-ts-kit/drizzle/postgres';
|
|
74
|
-
import { Database } from '@/platform/database/database
|
|
75
|
-
import { outbox, processedEvents } from '@/platform/database/schema
|
|
74
|
+
import { Database } from '@/platform/database/database';
|
|
75
|
+
import { outbox, processedEvents } from '@/platform/database/schema';
|
|
76
76
|
|
|
77
77
|
const db: PgDatabase<PgQueryResultHKT> = drizzle(process.env.DATABASE_URL);
|
|
78
78
|
const unitOfWork = createDrizzleUnitOfWork(db);
|
|
@@ -153,7 +153,7 @@ import { and, eq } from 'drizzle-orm';
|
|
|
153
153
|
import { Repository } from '@ddd-ts-kit/kernel/declarations';
|
|
154
154
|
import { optimisticUpdate } from '@ddd-ts-kit/drizzle/postgres';
|
|
155
155
|
|
|
156
|
-
@Repository(OrderRepository
|
|
156
|
+
@Repository(OrderRepository)
|
|
157
157
|
export class DrizzleOrderRepository implements OrderRepository {
|
|
158
158
|
constructor(private readonly database: Database) {}
|
|
159
159
|
|
|
@@ -222,7 +222,7 @@ export const invoices = contextSchema('billing-core').table(
|
|
|
222
222
|
import { Clock, ExecutionScope, stampCreation, stampUpdate, tenantScopeOf } from '@ddd-ts-kit/kernel';
|
|
223
223
|
import { Repository } from '@ddd-ts-kit/kernel/declarations';
|
|
224
224
|
|
|
225
|
-
@Repository(InvoiceRepository
|
|
225
|
+
@Repository(InvoiceRepository)
|
|
226
226
|
export class DrizzleInvoiceRepository implements InvoiceRepository {
|
|
227
227
|
constructor(
|
|
228
228
|
private readonly database: Database,
|
|
@@ -282,7 +282,7 @@ export abstract class InvoiceQueries {
|
|
|
282
282
|
import { ExecutionScope, decodeCursor, encodeCursor, pageOf } from '@ddd-ts-kit/kernel';
|
|
283
283
|
import { Repository } from '@ddd-ts-kit/kernel/declarations';
|
|
284
284
|
|
|
285
|
-
@Repository(InvoiceQueries
|
|
285
|
+
@Repository(InvoiceQueries)
|
|
286
286
|
export class DrizzleInvoiceQueries implements InvoiceQueries {
|
|
287
287
|
constructor(
|
|
288
288
|
private readonly database: Database,
|
|
@@ -427,7 +427,7 @@ export const appointmentList = contextSchema('scheduling').table('appointment_li
|
|
|
427
427
|
});
|
|
428
428
|
|
|
429
429
|
// infrastructure/persistence/drizzle-appointment-list.repository.ts
|
|
430
|
-
@Repository(AppointmentList
|
|
430
|
+
@Repository(AppointmentList)
|
|
431
431
|
export class DrizzleAppointmentList extends DrizzleReadModelStore<AppointmentRow, PgQueryResultHKT> implements AppointmentList {
|
|
432
432
|
constructor(database: Database) {
|
|
433
433
|
super(database, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ddd-ts-kit/drizzle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Drizzle adapters for the kernel ports on PostgreSQL: unit of work, transactional outbox store, processed-event store, one schema per context.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@ddd-ts-kit/kernel": "0.
|
|
30
|
-
"@ddd-ts-kit/events": "0.
|
|
29
|
+
"@ddd-ts-kit/kernel": "0.2.0",
|
|
30
|
+
"@ddd-ts-kit/events": "0.2.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"drizzle-orm": ">=0.40.0"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"drizzle-orm": "latest",
|
|
37
37
|
"@electric-sql/pglite": "latest",
|
|
38
|
-
"@ddd-ts-kit/testing": "0.
|
|
38
|
+
"@ddd-ts-kit/testing": "0.2.0",
|
|
39
39
|
"pg": "^8.23.1",
|
|
40
40
|
"@types/pg": "^8.23.1"
|
|
41
41
|
}
|