@event-driven-io/emmett-postgresql 0.43.0-beta.12 → 0.43.0-beta.14
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 +437 -0
- package/dist/index.cjs +1722 -3243
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +520 -462
- package/dist/index.d.ts +520 -462
- package/dist/index.js +1630 -3242
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
package/dist/index.d.cts
CHANGED
|
@@ -1,214 +1,251 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import pg from
|
|
6
|
-
import {
|
|
1
|
+
import { AnyConnection, DatabaseTransaction, Dumbo, MigrationStyle, QueryResultRow, RunSQLMigrationsResult, SQL, SQLExecutor, SQLMigration } from "@event-driven-io/dumbo";
|
|
2
|
+
import * as _$_event_driven_io_emmett0 from "@event-driven-io/emmett";
|
|
3
|
+
import { AnyCommand, AnyEvent, AnyMessage, AnyReadEventMetadata, AnyRecordedMessageMetadata, AppendToStreamOptions, AppendToStreamResultWithGlobalPosition, AsyncAwaiter, BatchRecordedMessageHandlerWithContext, BatchRecordedMessageHandlerWithoutContext, CanHandle, Checkpointer, DefaultRecord, EmmettError, Event, EventStore, EventStoreReadSchemaOptions, EventStoreSessionFactory, JSONSerializationOptions, Message, MessageConsumer, MessageConsumerOptions, MessageProcessor, ProcessorCheckpoint, ProjectionDefinition, ProjectionHandler, ProjectionHandlingType, ProjectionInitOptions, ProjectionRegistration, ProjectorOptions, ReactorOptions, ReadEvent, ReadEventMetadataWithGlobalPosition, ReadStreamOptions, ReadStreamResult, RecordedMessage, RecordedMessageMetadata, RecordedMessageMetadataWithGlobalPosition, SingleRecordedMessageHandlerWithContext, StreamExistsResult, ThenThrows, TruncateProjection, WorkflowProcessorContext, WorkflowProcessorOptions } from "@event-driven-io/emmett";
|
|
4
|
+
import { PgClient, PgClientConnection, PgDriverType, PgPool, PgPoolClientConnection, PgPoolOptions, PgTransaction } from "@event-driven-io/dumbo/pg";
|
|
5
|
+
import pg from "pg";
|
|
6
|
+
import { PongoClient, PongoDBCollectionOptions, PongoDocument, PongoFilter, WithId } from "@event-driven-io/pongo";
|
|
7
7
|
|
|
8
|
+
//#region src/eventStore/consumers/messageBatchProcessing/index.d.ts
|
|
8
9
|
declare const DefaultPostgreSQLEventStoreProcessorBatchSize = 100;
|
|
9
10
|
declare const DefaultPostgreSQLEventStoreProcessorPullingFrequencyInMs = 50;
|
|
10
11
|
type PostgreSQLEventStoreMessagesBatchHandlerResult = void | {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
type: 'STOP';
|
|
13
|
+
reason?: string;
|
|
14
|
+
error?: EmmettError;
|
|
14
15
|
};
|
|
15
16
|
type PostgreSQLEventStoreMessageBatchPullerOptions<MessageType extends Message = Message> = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
executor: SQLExecutor;
|
|
18
|
+
pullingFrequencyInMs: number;
|
|
19
|
+
batchSize: number;
|
|
20
|
+
eachBatch: BatchRecordedMessageHandlerWithoutContext<MessageType, ReadEventMetadataWithGlobalPosition>;
|
|
21
|
+
stopWhen?: {
|
|
22
|
+
noMessagesLeft?: boolean;
|
|
23
|
+
};
|
|
24
|
+
signal: AbortSignal;
|
|
24
25
|
};
|
|
25
26
|
type PostgreSQLEventStoreMessageBatchPullerStartFrom = {
|
|
26
|
-
|
|
27
|
+
lastCheckpoint: ProcessorCheckpoint;
|
|
27
28
|
} | 'BEGINNING' | 'END';
|
|
28
29
|
type PostgreSQLEventStoreMessageBatchPullerStartOptions = {
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
startFrom: PostgreSQLEventStoreMessageBatchPullerStartFrom;
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
started?: AsyncAwaiter<void>;
|
|
31
33
|
};
|
|
32
34
|
type PostgreSQLEventStoreMessageBatchPuller = {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
declare const postgreSQLEventStoreMessageBatchPuller: <MessageType extends Message = Message>({
|
|
35
|
+
isRunning: boolean;
|
|
36
|
+
start(options: PostgreSQLEventStoreMessageBatchPullerStartOptions): Promise<void>;
|
|
37
|
+
stop(): Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
declare const postgreSQLEventStoreMessageBatchPuller: <MessageType extends Message = Message>({
|
|
40
|
+
executor,
|
|
41
|
+
batchSize,
|
|
42
|
+
eachBatch,
|
|
43
|
+
pullingFrequencyInMs,
|
|
44
|
+
stopWhen,
|
|
45
|
+
signal
|
|
46
|
+
}: PostgreSQLEventStoreMessageBatchPullerOptions<MessageType>) => PostgreSQLEventStoreMessageBatchPuller;
|
|
38
47
|
declare const zipPostgreSQLEventStoreMessageBatchPullerStartFrom: (options: (PostgreSQLEventStoreMessageBatchPullerStartFrom | undefined)[]) => PostgreSQLEventStoreMessageBatchPullerStartFrom;
|
|
39
|
-
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/eventStore/projections/locks/tryAcquireProcessorLock.d.ts
|
|
40
50
|
type TryAcquireProcessorLockOptions = {
|
|
41
|
-
|
|
51
|
+
processorId: string;
|
|
52
|
+
version: number;
|
|
53
|
+
partition: string;
|
|
54
|
+
processorInstanceId: string;
|
|
55
|
+
projection?: {
|
|
56
|
+
name: string;
|
|
57
|
+
handlingType: ProjectionHandlingType;
|
|
58
|
+
kind: string;
|
|
42
59
|
version: number;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
name: string;
|
|
47
|
-
handlingType: ProjectionHandlingType;
|
|
48
|
-
kind: string;
|
|
49
|
-
version: number;
|
|
50
|
-
};
|
|
51
|
-
lockKey: string | bigint;
|
|
52
|
-
lockTimeoutSeconds?: number;
|
|
60
|
+
};
|
|
61
|
+
lockKey: string | bigint;
|
|
62
|
+
lockTimeoutSeconds?: number;
|
|
53
63
|
};
|
|
54
64
|
type LockAcquisitionPolicy = {
|
|
55
|
-
|
|
65
|
+
type: 'fail';
|
|
56
66
|
} | {
|
|
57
|
-
|
|
67
|
+
type: 'skip';
|
|
58
68
|
} | {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
type: 'retry';
|
|
70
|
+
retries: number;
|
|
71
|
+
minTimeout?: number;
|
|
72
|
+
maxTimeout?: number;
|
|
63
73
|
};
|
|
64
|
-
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/eventStore/projections/locks/postgreSQLProcessorLock.d.ts
|
|
65
76
|
type PostgreSQLProcessorLockOptions = {
|
|
66
|
-
|
|
77
|
+
processorId: string;
|
|
78
|
+
version: number;
|
|
79
|
+
partition: string;
|
|
80
|
+
processorInstanceId: string;
|
|
81
|
+
projection?: {
|
|
82
|
+
name: string;
|
|
83
|
+
handlingType: ProjectionHandlingType;
|
|
84
|
+
kind: string;
|
|
67
85
|
version: number;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
handlingType: ProjectionHandlingType;
|
|
73
|
-
kind: string;
|
|
74
|
-
version: number;
|
|
75
|
-
};
|
|
76
|
-
lockKey?: string | bigint;
|
|
77
|
-
lockTimeoutSeconds?: number;
|
|
78
|
-
lockAcquisitionPolicy?: LockAcquisitionPolicy;
|
|
86
|
+
};
|
|
87
|
+
lockKey?: string | bigint;
|
|
88
|
+
lockTimeoutSeconds?: number;
|
|
89
|
+
lockAcquisitionPolicy?: LockAcquisitionPolicy;
|
|
79
90
|
};
|
|
80
91
|
type PostgreSQLProcessorLockContext = {
|
|
81
|
-
|
|
92
|
+
execute: SQLExecutor;
|
|
82
93
|
};
|
|
83
94
|
type PostgreSQLProcessorLock = {
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
tryAcquire: (options: PostgreSQLProcessorLockContext) => Promise<boolean>;
|
|
96
|
+
release: (options: PostgreSQLProcessorLockContext) => Promise<void>;
|
|
86
97
|
};
|
|
87
98
|
declare const DefaultPostgreSQLProcessorLockPolicy: LockAcquisitionPolicy;
|
|
88
99
|
declare const postgreSQLProcessorLock: (options: PostgreSQLProcessorLockOptions) => PostgreSQLProcessorLock;
|
|
89
|
-
declare const toProcessorLockKey: ({
|
|
90
|
-
|
|
100
|
+
declare const toProcessorLockKey: ({
|
|
101
|
+
projection,
|
|
102
|
+
processorId,
|
|
103
|
+
partition,
|
|
104
|
+
version
|
|
105
|
+
}: Pick<TryAcquireProcessorLockOptions, "projection" | "processorId" | "version" | "partition">) => string;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/eventStore/projections/locks/tryAcquireProjectionLock.d.ts
|
|
91
108
|
type TryAcquireProjectionLockOptions = {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
109
|
+
projectionName: string;
|
|
110
|
+
partition: string;
|
|
111
|
+
version: number;
|
|
112
|
+
lockKey: string | bigint;
|
|
96
113
|
};
|
|
97
|
-
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/eventStore/projections/locks/postgreSQLProjectionLock.d.ts
|
|
98
116
|
type PostgreSQLProjectionLockOptions = {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
117
|
+
projectionName: string;
|
|
118
|
+
partition: string;
|
|
119
|
+
version: number;
|
|
120
|
+
lockKey?: string | bigint;
|
|
103
121
|
};
|
|
104
122
|
type PostgreSQLProjectionLockContext = {
|
|
105
|
-
|
|
123
|
+
execute: SQLExecutor;
|
|
106
124
|
};
|
|
107
125
|
type PostgreSQLProjectionLock = {
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
tryAcquire: (options: PostgreSQLProjectionLockContext) => Promise<boolean>;
|
|
127
|
+
release: (options: PostgreSQLProjectionLockContext) => void;
|
|
110
128
|
};
|
|
111
129
|
declare const postgreSQLProjectionLock: (options: PostgreSQLProjectionLockOptions) => PostgreSQLProjectionLock;
|
|
112
|
-
declare const toProjectionLockKey: ({
|
|
113
|
-
|
|
130
|
+
declare const toProjectionLockKey: ({
|
|
131
|
+
projectionName,
|
|
132
|
+
partition,
|
|
133
|
+
version
|
|
134
|
+
}: Pick<TryAcquireProjectionLockOptions, "projectionName" | "partition" | "version">) => string;
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/eventStore/projections/management/projectionManagement.d.ts
|
|
114
137
|
declare const registerProjection: <ReadEventMetadataType extends AnyReadEventMetadata = AnyReadEventMetadata, ProjectionHandlerContext extends DefaultRecord = DefaultRecord>(execute: SQLExecutor, options: {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
138
|
+
partition: string;
|
|
139
|
+
status: "active" | "inactive";
|
|
140
|
+
registration: ProjectionRegistration<ProjectionHandlingType, ReadEventMetadataType, ProjectionHandlerContext>;
|
|
118
141
|
}) => Promise<{
|
|
119
|
-
|
|
142
|
+
registered: boolean;
|
|
120
143
|
}>;
|
|
121
144
|
declare const activateProjection: (execute: SQLExecutor, options: {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
145
|
+
name: string;
|
|
146
|
+
partition: string;
|
|
147
|
+
version: number;
|
|
125
148
|
}) => Promise<{
|
|
126
|
-
|
|
149
|
+
activated: boolean;
|
|
127
150
|
}>;
|
|
128
151
|
declare const deactivateProjection: (execute: SQLExecutor, options: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
152
|
+
name: string;
|
|
153
|
+
partition: string;
|
|
154
|
+
version: number;
|
|
132
155
|
}) => Promise<{
|
|
133
|
-
|
|
156
|
+
deactivated: boolean;
|
|
134
157
|
}>;
|
|
135
158
|
type ProjectionRegistrationWithMandatoryData = ProjectionRegistration<ProjectionHandlingType> & {
|
|
136
|
-
|
|
159
|
+
projection: Required<Pick<ProjectionDefinition, 'kind' | 'version' | 'name'>>;
|
|
137
160
|
};
|
|
138
161
|
type ReadProjectionInfoResult = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
};
|
|
145
|
-
declare const readProjectionInfo: (execute: SQLExecutor, {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
162
|
+
partition: string;
|
|
163
|
+
status: 'active' | 'inactive';
|
|
164
|
+
registration: ProjectionRegistrationWithMandatoryData;
|
|
165
|
+
createdAt: Date;
|
|
166
|
+
lastUpdated: Date;
|
|
167
|
+
};
|
|
168
|
+
declare const readProjectionInfo: (execute: SQLExecutor, {
|
|
169
|
+
name,
|
|
170
|
+
partition,
|
|
171
|
+
version
|
|
172
|
+
}: {
|
|
173
|
+
name: string;
|
|
174
|
+
partition: string;
|
|
175
|
+
version: number;
|
|
149
176
|
}) => Promise<ReadProjectionInfoResult | null>;
|
|
150
|
-
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/eventStore/projections/pongo/pongoProjections.d.ts
|
|
151
179
|
type PongoProjectionHandlerContext = PostgreSQLProjectionHandlerContext & {
|
|
152
|
-
|
|
180
|
+
pongo: PongoClient;
|
|
153
181
|
};
|
|
154
182
|
type PongoWithNotNullDocumentEvolve<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = ((document: Document, event: ReadEvent<EventType, EventMetaDataType>) => Document | null) | ((document: Document, event: ReadEvent<EventType>) => Promise<Document | null>);
|
|
155
183
|
type PongoWithNullableDocumentEvolve<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = ((document: Document | null, event: ReadEvent<EventType, EventMetaDataType>) => Document | null) | ((document: Document | null, event: ReadEvent<EventType>) => Promise<Document | null>);
|
|
156
184
|
type PongoDocumentEvolve<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType> | PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
|
|
157
185
|
type PongoProjectionOptions<EventType extends Event, EventPayloadType extends Event = EventType> = {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
186
|
+
name: string;
|
|
187
|
+
kind?: string;
|
|
188
|
+
version?: number;
|
|
189
|
+
handle: (events: ReadEvent<EventType, PostgresReadEventMetadata>[], context: PongoProjectionHandlerContext) => Promise<void>;
|
|
190
|
+
canHandle: CanHandle<EventType>;
|
|
191
|
+
truncate?: TruncateProjection<PongoProjectionHandlerContext>;
|
|
192
|
+
init?: (context: PongoProjectionHandlerContext) => void | Promise<void>;
|
|
193
|
+
eventsOptions?: {
|
|
194
|
+
schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
|
|
195
|
+
};
|
|
168
196
|
} & JSONSerializationOptions;
|
|
169
|
-
declare const pongoProjection: <EventType extends Event, EventPayloadType extends Event = EventType>({
|
|
197
|
+
declare const pongoProjection: <EventType extends Event, EventPayloadType extends Event = EventType>({
|
|
198
|
+
name,
|
|
199
|
+
kind,
|
|
200
|
+
version,
|
|
201
|
+
truncate,
|
|
202
|
+
handle,
|
|
203
|
+
canHandle,
|
|
204
|
+
eventsOptions
|
|
205
|
+
}: PongoProjectionOptions<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
|
|
170
206
|
type PongoMultiStreamProjectionOptions<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType, DocumentPayload extends PongoDocument = Document> = {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
207
|
+
kind?: string;
|
|
208
|
+
canHandle: CanHandle<EventType>;
|
|
209
|
+
version?: number;
|
|
210
|
+
collectionName: string;
|
|
211
|
+
collectionOptions?: PongoDBCollectionOptions<Document, DocumentPayload>;
|
|
212
|
+
eventsOptions?: {
|
|
213
|
+
schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
|
|
214
|
+
};
|
|
215
|
+
getDocumentId: (event: ReadEvent<EventType>) => string;
|
|
180
216
|
} & ({
|
|
181
|
-
|
|
217
|
+
evolve: PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
|
|
182
218
|
} | {
|
|
183
|
-
|
|
184
|
-
|
|
219
|
+
evolve: PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType>;
|
|
220
|
+
initialState: () => Document;
|
|
185
221
|
}) & JSONSerializationOptions;
|
|
186
222
|
declare const pongoMultiStreamProjection: <Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType>(options: PongoMultiStreamProjectionOptions<Document, EventType, EventMetaDataType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
|
|
187
223
|
type PongoSingleStreamProjectionOptions<Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType, DocumentPayload extends PongoDocument = Document> = {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
224
|
+
canHandle: CanHandle<EventType>;
|
|
225
|
+
getDocumentId?: (event: ReadEvent<EventType>) => string;
|
|
226
|
+
version?: number;
|
|
227
|
+
collectionName: string;
|
|
228
|
+
collectionOptions?: PongoDBCollectionOptions<Document, DocumentPayload>;
|
|
229
|
+
eventsOptions?: {
|
|
230
|
+
schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
|
|
231
|
+
};
|
|
196
232
|
} & ({
|
|
197
|
-
|
|
233
|
+
evolve: PongoWithNullableDocumentEvolve<Document, EventType, EventMetaDataType>;
|
|
198
234
|
} | {
|
|
199
|
-
|
|
200
|
-
|
|
235
|
+
evolve: PongoWithNotNullDocumentEvolve<Document, EventType, EventMetaDataType>;
|
|
236
|
+
initialState: () => Document;
|
|
201
237
|
}) & JSONSerializationOptions;
|
|
202
238
|
declare const pongoSingleStreamProjection: <Document extends PongoDocument, EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata, EventPayloadType extends Event = EventType>(options: PongoSingleStreamProjectionOptions<Document, EventType, EventMetaDataType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
|
|
203
|
-
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/eventStore/projections/pongo/pongoProjectionSpec.d.ts
|
|
204
241
|
type PongoAssertOptions = {
|
|
205
|
-
|
|
206
|
-
|
|
242
|
+
inCollection: string;
|
|
243
|
+
inDatabase?: string;
|
|
207
244
|
};
|
|
208
245
|
type FilterOrId<Doc extends PongoDocument | WithId<PongoDocument>> = {
|
|
209
|
-
|
|
246
|
+
withId: string;
|
|
210
247
|
} | {
|
|
211
|
-
|
|
248
|
+
matchingFilter: PongoFilter<Doc>;
|
|
212
249
|
};
|
|
213
250
|
declare const documentExists: <Doc extends PongoDocument | WithId<PongoDocument>>(document: Doc, options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
|
|
214
251
|
declare const documentsAreTheSame: <Doc extends PongoDocument | WithId<PongoDocument>>(documents: Doc[], options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
|
|
@@ -216,259 +253,273 @@ declare const documentsMatchingHaveCount: <Doc extends PongoDocument | WithId<Po
|
|
|
216
253
|
declare const documentMatchingExists: <Doc extends PongoDocument | WithId<PongoDocument>>(options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
|
|
217
254
|
declare const documentDoesNotExist: <Doc extends PongoDocument | WithId<PongoDocument>>(options: PongoAssertOptions & FilterOrId<Doc>) => PostgreSQLProjectionAssert;
|
|
218
255
|
declare const expectPongoDocuments: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
};
|
|
256
|
+
fromCollection: <Doc extends PongoDocument | WithId<PongoDocument>>(collectionName: string) => {
|
|
257
|
+
withId: (id: string) => {
|
|
258
|
+
toBeEqual: (document: Doc) => PostgreSQLProjectionAssert;
|
|
259
|
+
toExist: () => PostgreSQLProjectionAssert;
|
|
260
|
+
notToExist: () => PostgreSQLProjectionAssert;
|
|
261
|
+
};
|
|
262
|
+
matching: <Doc_1 extends PongoDocument | WithId<PongoDocument>>(filter: PongoFilter<Doc_1>) => {
|
|
263
|
+
toBeTheSame: (documents: Doc_1[]) => PostgreSQLProjectionAssert;
|
|
264
|
+
toHaveCount: (expectedCount: number) => PostgreSQLProjectionAssert;
|
|
265
|
+
toExist: () => PostgreSQLProjectionAssert;
|
|
266
|
+
notToExist: () => PostgreSQLProjectionAssert;
|
|
231
267
|
};
|
|
268
|
+
};
|
|
232
269
|
};
|
|
233
|
-
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/eventStore/projections/postgresProjectionSpec.d.ts
|
|
234
272
|
type PostgreSQLProjectionSpecEvent<EventType extends Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = EventType & {
|
|
235
|
-
|
|
273
|
+
metadata?: Partial<EventMetaDataType>;
|
|
236
274
|
};
|
|
237
275
|
type PostgreSQLProjectionSpecWhenOptions = {
|
|
238
|
-
|
|
276
|
+
numberOfTimes: number;
|
|
277
|
+
};
|
|
278
|
+
type PostgreSQLProjectionSpec<EventType extends Event> = (givenEvents: PostgreSQLProjectionSpecEvent<EventType>[]) => {
|
|
279
|
+
when: (events: PostgreSQLProjectionSpecEvent<EventType>[], options?: PostgreSQLProjectionSpecWhenOptions) => {
|
|
280
|
+
then: (assert: PostgreSQLProjectionAssert, message?: string) => Promise<void>;
|
|
281
|
+
thenThrows: <ErrorType extends Error = Error>(...args: Parameters<ThenThrows<ErrorType>>) => Promise<void>;
|
|
282
|
+
};
|
|
239
283
|
};
|
|
240
284
|
type PostgreSQLProjectionAssert = (options: {
|
|
241
|
-
|
|
242
|
-
|
|
285
|
+
pool: Dumbo;
|
|
286
|
+
connectionString: string;
|
|
243
287
|
}) => Promise<void | boolean>;
|
|
244
288
|
type PostgreSQLProjectionSpecOptions<EventType extends Event> = {
|
|
245
|
-
|
|
289
|
+
projection: PostgreSQLProjectionDefinition<EventType>;
|
|
246
290
|
} & PgPoolOptions;
|
|
247
|
-
type PostgreSQLProjectionSpec<EventType extends Event> = (givenEvents: PostgreSQLProjectionSpecEvent<EventType>[]) => {
|
|
248
|
-
when: (events: PostgreSQLProjectionSpecEvent<EventType>[], options?: PostgreSQLProjectionSpecWhenOptions) => {
|
|
249
|
-
then: (assert: PostgreSQLProjectionAssert, message?: string) => Promise<void>;
|
|
250
|
-
thenThrows: <ErrorType extends Error = Error>(...args: Parameters<ThenThrows<ErrorType>>) => Promise<void>;
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
291
|
declare const PostgreSQLProjectionSpec: {
|
|
254
|
-
|
|
292
|
+
for: <EventType extends Event>(options: PostgreSQLProjectionSpecOptions<EventType>) => PostgreSQLProjectionSpec<EventType>;
|
|
255
293
|
};
|
|
256
294
|
declare const eventInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata>(streamName: string, event: PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>) => PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>;
|
|
257
295
|
declare const eventsInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata>(streamName: string, events: PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[]) => PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[];
|
|
258
|
-
declare const newEventsInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata =
|
|
296
|
+
declare const newEventsInStream: <EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = _$_event_driven_io_emmett0.RecordedMessageMetadataWithGlobalPosition>(streamName: string, events: PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[]) => PostgreSQLProjectionSpecEvent<EventType, EventMetaDataType>[];
|
|
259
297
|
declare const assertSQLQueryResultMatches: <T extends QueryResultRow>(sql: SQL, rows: T[]) => PostgreSQLProjectionAssert;
|
|
260
298
|
declare const expectSQL: {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
};
|
|
299
|
+
query: (sql: SQL) => {
|
|
300
|
+
resultRows: {
|
|
301
|
+
toBeTheSame: <T extends QueryResultRow>(rows: T[]) => PostgreSQLProjectionAssert;
|
|
265
302
|
};
|
|
303
|
+
};
|
|
266
304
|
};
|
|
267
|
-
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/eventStore/schema/typing.d.ts
|
|
268
307
|
declare const emmettPrefix = "emt";
|
|
269
308
|
declare const globalTag = "global";
|
|
270
309
|
declare const defaultTag = "emt:default";
|
|
271
310
|
declare const unknownTag = "emt:unknown";
|
|
272
311
|
declare const globalNames: {
|
|
273
|
-
|
|
274
|
-
|
|
312
|
+
module: string;
|
|
313
|
+
tenant: string;
|
|
275
314
|
};
|
|
276
315
|
declare const streamsTable: {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
};
|
|
282
|
-
isArchived: {
|
|
283
|
-
name: string;
|
|
284
|
-
};
|
|
316
|
+
name: string;
|
|
317
|
+
columns: {
|
|
318
|
+
partition: {
|
|
319
|
+
name: string;
|
|
285
320
|
};
|
|
321
|
+
isArchived: {
|
|
322
|
+
name: string;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
286
325
|
};
|
|
287
326
|
declare const messagesTable: {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
};
|
|
327
|
+
name: string;
|
|
328
|
+
columns: {
|
|
329
|
+
partition: {
|
|
330
|
+
name: string;
|
|
331
|
+
};
|
|
332
|
+
isArchived: {
|
|
333
|
+
name: string;
|
|
296
334
|
};
|
|
335
|
+
};
|
|
297
336
|
};
|
|
298
337
|
declare const processorsTable: {
|
|
299
|
-
|
|
338
|
+
name: string;
|
|
300
339
|
};
|
|
301
340
|
declare const projectionsTable: {
|
|
302
|
-
|
|
341
|
+
name: string;
|
|
303
342
|
};
|
|
304
|
-
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/eventStore/schema/appendToStream.d.ts
|
|
305
345
|
declare const appendToStreamSQL: SQL;
|
|
306
346
|
type CallAppendToStreamParams = {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
347
|
+
messageIds: string[];
|
|
348
|
+
messagesData: DefaultRecord[];
|
|
349
|
+
messagesMetadata: DefaultRecord[];
|
|
350
|
+
schemaVersions: string[];
|
|
351
|
+
messageTypes: string[];
|
|
352
|
+
messageKinds: string[];
|
|
353
|
+
streamId: string;
|
|
354
|
+
streamType: string;
|
|
355
|
+
expectedStreamPosition: bigint | null;
|
|
356
|
+
partition: string;
|
|
317
357
|
};
|
|
318
358
|
declare const callAppendToStream: (params: CallAppendToStreamParams) => SQL;
|
|
319
359
|
type AppendToStreamResult = {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
360
|
+
success: true;
|
|
361
|
+
nextStreamPosition: bigint;
|
|
362
|
+
globalPositions: bigint[];
|
|
363
|
+
transactionId: string;
|
|
324
364
|
} | {
|
|
325
|
-
|
|
365
|
+
success: false;
|
|
326
366
|
};
|
|
327
367
|
type AppendToStreamBeforeCommitHook = (messages: RecordedMessage[], context: {
|
|
328
|
-
|
|
368
|
+
transaction: PgTransaction;
|
|
329
369
|
}) => Promise<void>;
|
|
330
370
|
declare const appendToStream: (pool: PgPool, streamName: string, streamType: string, messages: Message[], options?: AppendToStreamOptions & {
|
|
331
|
-
|
|
332
|
-
|
|
371
|
+
partition?: string;
|
|
372
|
+
beforeCommitHook?: AppendToStreamBeforeCommitHook;
|
|
333
373
|
}) => Promise<AppendToStreamResult>;
|
|
334
|
-
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region src/eventStore/schema/migrations/0_43_0/index.d.ts
|
|
335
376
|
declare const cleanupLegacySubscriptionTables: (connectionString: string) => Promise<void>;
|
|
336
|
-
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region src/eventStore/schema/processors/processorsLocks.d.ts
|
|
337
379
|
declare const tryAcquireProcessorLockSQL: SQL;
|
|
338
380
|
declare const releaseProcessorLockSQL: SQL;
|
|
339
381
|
type CallTryAcquireProcessorLockParams = {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
382
|
+
lockKey: string;
|
|
383
|
+
processorId: string;
|
|
384
|
+
version: number;
|
|
385
|
+
partition: string;
|
|
386
|
+
processorInstanceId: string;
|
|
387
|
+
projectionName: string | null;
|
|
388
|
+
projectionType: 'i' | 'a' | null;
|
|
389
|
+
projectionKind: string | null;
|
|
390
|
+
lockTimeoutSeconds: number;
|
|
349
391
|
};
|
|
350
392
|
declare const callTryAcquireProcessorLock: (params: CallTryAcquireProcessorLockParams) => SQL;
|
|
351
393
|
type CallReleaseProcessorLockParams = {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
394
|
+
lockKey: string;
|
|
395
|
+
processorId: string;
|
|
396
|
+
partition: string;
|
|
397
|
+
version: number;
|
|
398
|
+
processorInstanceId: string;
|
|
399
|
+
projectionName: string | null;
|
|
358
400
|
};
|
|
359
401
|
declare const callReleaseProcessorLock: (params: CallReleaseProcessorLockParams) => SQL;
|
|
360
|
-
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/eventStore/schema/projections/projectionsLocks.d.ts
|
|
361
404
|
declare const tryAcquireProjectionLockSQL: SQL;
|
|
362
405
|
type CallTryAcquireProjectionLockParams = {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
406
|
+
lockKey: string;
|
|
407
|
+
partition: string;
|
|
408
|
+
name: string;
|
|
409
|
+
version: number;
|
|
367
410
|
};
|
|
368
411
|
declare const callTryAcquireProjectionLock: (params: CallTryAcquireProjectionLockParams) => SQL;
|
|
369
|
-
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region src/eventStore/schema/projections/registerProjection.d.ts
|
|
370
414
|
declare const registerProjectionSQL: SQL;
|
|
371
415
|
declare const activateProjectionSQL: SQL;
|
|
372
416
|
declare const deactivateProjectionSQL: SQL;
|
|
373
417
|
type CallRegisterProjectionParams = {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
418
|
+
lockKey: string;
|
|
419
|
+
name: string;
|
|
420
|
+
partition: string;
|
|
421
|
+
version: number;
|
|
422
|
+
type: 'i' | 'a';
|
|
423
|
+
kind: string;
|
|
424
|
+
status: string;
|
|
425
|
+
definition: string;
|
|
382
426
|
};
|
|
383
427
|
declare const callRegisterProjection: (params: CallRegisterProjectionParams) => SQL;
|
|
384
428
|
type CallActivateProjectionParams = {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
429
|
+
lockKey: string;
|
|
430
|
+
name: string;
|
|
431
|
+
partition: string;
|
|
432
|
+
version: number;
|
|
389
433
|
};
|
|
390
434
|
declare const callActivateProjection: (params: CallActivateProjectionParams) => SQL;
|
|
391
435
|
type CallDeactivateProjectionParams = {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
436
|
+
lockKey: string;
|
|
437
|
+
name: string;
|
|
438
|
+
partition: string;
|
|
439
|
+
version: number;
|
|
396
440
|
};
|
|
397
441
|
declare const callDeactivateProjection: (params: CallDeactivateProjectionParams) => SQL;
|
|
398
|
-
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region src/eventStore/schema/readLastMessageGlobalPosition.d.ts
|
|
399
444
|
type ReadLastMessageGlobalPositionResult = {
|
|
400
|
-
|
|
445
|
+
currentGlobalPosition: bigint | null;
|
|
401
446
|
};
|
|
402
447
|
declare const readLastMessageGlobalPosition: (execute: SQLExecutor, options?: {
|
|
403
|
-
|
|
448
|
+
partition?: string;
|
|
404
449
|
}) => Promise<ReadLastMessageGlobalPositionResult>;
|
|
405
|
-
|
|
450
|
+
//#endregion
|
|
451
|
+
//#region src/eventStore/schema/readMessagesBatch.d.ts
|
|
406
452
|
type ReadMessagesBatchOptions = {
|
|
407
|
-
|
|
408
|
-
|
|
453
|
+
after: bigint;
|
|
454
|
+
batchSize: number;
|
|
409
455
|
} | {
|
|
410
|
-
|
|
411
|
-
|
|
456
|
+
from: bigint;
|
|
457
|
+
batchSize: number;
|
|
412
458
|
} | {
|
|
413
|
-
|
|
414
|
-
|
|
459
|
+
to: bigint;
|
|
460
|
+
batchSize: number;
|
|
415
461
|
} | {
|
|
416
|
-
|
|
417
|
-
|
|
462
|
+
from: bigint;
|
|
463
|
+
to: bigint;
|
|
418
464
|
};
|
|
419
465
|
type ReadMessagesBatchResult<MessageType extends Message, MessageMetadataType extends RecordedMessageMetadata = RecordedMessageMetadata> = {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
466
|
+
currentGlobalPosition: bigint;
|
|
467
|
+
messages: RecordedMessage<MessageType, MessageMetadataType>[];
|
|
468
|
+
areMessagesLeft: boolean;
|
|
423
469
|
};
|
|
424
470
|
declare const readMessagesBatch: <MessageType extends Message, RecordedMessageMetadataType extends RecordedMessageMetadataWithGlobalPosition = RecordedMessageMetadataWithGlobalPosition>(execute: SQLExecutor, options: ReadMessagesBatchOptions & {
|
|
425
|
-
|
|
471
|
+
partition?: string;
|
|
426
472
|
}) => Promise<ReadMessagesBatchResult<MessageType, RecordedMessageMetadataType>>;
|
|
427
|
-
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region src/eventStore/schema/readProcessorCheckpoint.d.ts
|
|
428
475
|
type ReadProcessorCheckpointResult = {
|
|
429
|
-
|
|
476
|
+
lastProcessedCheckpoint: ProcessorCheckpoint | null;
|
|
430
477
|
};
|
|
431
478
|
declare const readProcessorCheckpoint: (execute: SQLExecutor, options: {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
479
|
+
processorId: string;
|
|
480
|
+
partition?: string;
|
|
481
|
+
version?: number;
|
|
435
482
|
}) => Promise<ReadProcessorCheckpointResult>;
|
|
436
|
-
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region src/eventStore/schema/readStream.d.ts
|
|
437
485
|
declare const readStream: <EventType extends Event, EventPayloadType extends Event = EventType>(execute: SQLExecutor, streamId: string, options?: ReadStreamOptions<EventType, EventPayloadType> & {
|
|
438
|
-
|
|
486
|
+
partition?: string;
|
|
439
487
|
}) => Promise<ReadStreamResult<EventType, ReadEventMetadataWithGlobalPosition>>;
|
|
440
|
-
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/eventStore/schema/storeProcessorCheckpoint.d.ts
|
|
441
490
|
declare const storeSubscriptionCheckpointSQL: SQL;
|
|
442
491
|
type CallStoreProcessorCheckpointParams = {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
492
|
+
processorId: string;
|
|
493
|
+
version: number;
|
|
494
|
+
position: string | null;
|
|
495
|
+
checkPosition: string | null;
|
|
496
|
+
partition: string;
|
|
497
|
+
processorInstanceId: string;
|
|
449
498
|
};
|
|
450
499
|
declare const callStoreProcessorCheckpoint: (params: CallStoreProcessorCheckpointParams) => SQL;
|
|
451
500
|
type StoreProcessorCheckpointResult = {
|
|
452
|
-
|
|
453
|
-
|
|
501
|
+
success: true;
|
|
502
|
+
newCheckpoint: ProcessorCheckpoint | null;
|
|
454
503
|
} | {
|
|
455
|
-
|
|
456
|
-
|
|
504
|
+
success: false;
|
|
505
|
+
reason: 'IGNORED' | 'MISMATCH' | 'CURRENT_AHEAD';
|
|
457
506
|
};
|
|
458
507
|
declare const storeProcessorCheckpoint: (execute: SQLExecutor, options: {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
508
|
+
processorId: string;
|
|
509
|
+
version: number | undefined;
|
|
510
|
+
newCheckpoint: ProcessorCheckpoint | null;
|
|
511
|
+
lastProcessedCheckpoint: ProcessorCheckpoint | null;
|
|
512
|
+
partition?: string;
|
|
513
|
+
processorInstanceId?: string;
|
|
465
514
|
}) => Promise<StoreProcessorCheckpointResult>;
|
|
466
|
-
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region src/eventStore/schema/streamExists.d.ts
|
|
467
517
|
type PostgresStreamExistsOptions = {
|
|
468
|
-
|
|
518
|
+
partition: string;
|
|
469
519
|
};
|
|
470
520
|
declare const streamExists: (execute: SQLExecutor, streamId: string, options?: PostgresStreamExistsOptions) => Promise<StreamExistsResult>;
|
|
471
|
-
|
|
521
|
+
//#endregion
|
|
522
|
+
//#region src/eventStore/schema/tables.d.ts
|
|
472
523
|
declare const streamsTableSQL: SQL;
|
|
473
524
|
declare const messagesTableSQL: SQL;
|
|
474
525
|
declare const processorsTableSQL: SQL;
|
|
@@ -481,225 +532,229 @@ declare const addTenantSQL: SQL;
|
|
|
481
532
|
declare const addModuleForAllTenantsSQL: SQL;
|
|
482
533
|
declare const addTenantForAllModulesSQL: SQL;
|
|
483
534
|
declare const addDefaultPartitionSQL: SQL;
|
|
484
|
-
|
|
535
|
+
//#endregion
|
|
536
|
+
//#region src/eventStore/schema/index.d.ts
|
|
485
537
|
declare const schemaSQL: SQL[];
|
|
486
538
|
declare const schemaMigration: SQLMigration;
|
|
487
539
|
declare const eventStoreSchemaMigrations: SQLMigration[];
|
|
488
540
|
type CreateEventStoreSchemaOptions = {
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
541
|
+
dryRun?: boolean | undefined;
|
|
542
|
+
ignoreMigrationHashMismatch?: boolean | undefined;
|
|
543
|
+
migrationTimeoutMs?: number | undefined;
|
|
492
544
|
} & JSONSerializationOptions;
|
|
493
545
|
type EventStoreSchemaMigrationOptions = {
|
|
494
|
-
|
|
546
|
+
migrationOptions?: CreateEventStoreSchemaOptions;
|
|
495
547
|
};
|
|
496
548
|
declare const createEventStoreSchema: (connectionString: string, pool: PgPool, hooks?: PostgresEventStoreOptions["hooks"], options?: CreateEventStoreSchemaOptions) => Promise<RunSQLMigrationsResult>;
|
|
497
|
-
|
|
549
|
+
//#endregion
|
|
550
|
+
//#region src/eventStore/projections/postgreSQLProjection.d.ts
|
|
498
551
|
type PostgreSQLProjectionHandlerContext = {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
552
|
+
execute: SQLExecutor;
|
|
553
|
+
connection: {
|
|
554
|
+
connectionString: string;
|
|
555
|
+
client: PgClient;
|
|
556
|
+
transaction: PgTransaction;
|
|
557
|
+
pool: Dumbo;
|
|
558
|
+
};
|
|
506
559
|
} & EventStoreSchemaMigrationOptions;
|
|
507
560
|
declare const transactionToPostgreSQLProjectionHandlerContext: (connectionString: string, pool: Dumbo, transaction: PgTransaction | DatabaseTransaction<AnyConnection>) => Promise<PostgreSQLProjectionHandlerContext>;
|
|
508
561
|
type PostgreSQLProjectionHandler<EventType extends Event = Event, EventMetaDataType extends PostgresReadEventMetadata = PostgresReadEventMetadata> = ProjectionHandler<EventType, EventMetaDataType, PostgreSQLProjectionHandlerContext>;
|
|
509
562
|
type PostgreSQLProjectionDefinition<EventType extends Event = Event, EventPayloadType extends Event = EventType> = ProjectionDefinition<EventType, PostgresReadEventMetadata, PostgreSQLProjectionHandlerContext, EventPayloadType>;
|
|
510
563
|
type PostgreSQLProjectionHandlerOptions<EventType extends Event = Event> = {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
564
|
+
events: ReadEvent<EventType, PostgresReadEventMetadata>[];
|
|
565
|
+
projections: PostgreSQLProjectionDefinition<EventType>[];
|
|
566
|
+
partition?: string;
|
|
514
567
|
} & PostgreSQLProjectionHandlerContext;
|
|
515
568
|
declare const handleProjections: <EventType extends Event = Event>(options: PostgreSQLProjectionHandlerOptions<EventType>) => Promise<void>;
|
|
516
569
|
declare const postgreSQLProjection: <EventType extends Event, EventPayloadType extends Event = EventType>(definition: PostgreSQLProjectionDefinition<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
|
|
517
570
|
type PostgreSQLRawBatchSQLProjection<EventType extends Event, EventPayloadType extends Event = EventType> = {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
571
|
+
name: string;
|
|
572
|
+
kind?: string;
|
|
573
|
+
version?: number;
|
|
574
|
+
evolve: (events: EventType[], context: PostgreSQLProjectionHandlerContext) => Promise<SQL[]> | SQL[];
|
|
575
|
+
canHandle: CanHandle<EventType>;
|
|
576
|
+
init?: (context: ProjectionInitOptions<PostgreSQLProjectionHandlerContext>) => void | Promise<void> | SQL | Promise<SQL> | Promise<SQL[]> | SQL[];
|
|
577
|
+
eventsOptions?: {
|
|
578
|
+
schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
|
|
579
|
+
};
|
|
527
580
|
} & JSONSerializationOptions;
|
|
528
581
|
declare const postgreSQLRawBatchSQLProjection: <EventType extends Event, EventPayloadType extends Event = EventType>(options: PostgreSQLRawBatchSQLProjection<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
|
|
529
582
|
type PostgreSQLRawSQLProjection<EventType extends Event, EventPayloadType extends Event = EventType> = {
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
583
|
+
name: string;
|
|
584
|
+
kind?: string;
|
|
585
|
+
version?: number;
|
|
586
|
+
evolve: (events: EventType, context: PostgreSQLProjectionHandlerContext) => Promise<SQL[]> | SQL[] | Promise<SQL> | SQL;
|
|
587
|
+
canHandle: CanHandle<EventType>;
|
|
588
|
+
init?: (context: ProjectionInitOptions<PostgreSQLProjectionHandlerContext>) => void | Promise<void> | SQL | Promise<SQL> | Promise<SQL[]> | SQL[];
|
|
589
|
+
eventsOptions?: {
|
|
590
|
+
schema?: EventStoreReadSchemaOptions<EventType, EventPayloadType>;
|
|
591
|
+
};
|
|
539
592
|
} & JSONSerializationOptions;
|
|
540
593
|
declare const postgreSQLRawSQLProjection: <EventType extends Event, EventPayloadType extends Event = EventType>(options: PostgreSQLRawSQLProjection<EventType, EventPayloadType>) => PostgreSQLProjectionDefinition<EventType, EventPayloadType>;
|
|
541
|
-
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region src/eventStore/postgreSQLEventStore.d.ts
|
|
542
596
|
interface PostgresEventStore extends EventStore<PostgresReadEventMetadata>, EventStoreSessionFactory<PostgresEventStore> {
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
};
|
|
597
|
+
appendToStream<EventType extends Event, EventPayloadType extends Event = EventType>(streamName: string, events: EventType[], options?: AppendToStreamOptions<EventType, EventPayloadType>): Promise<AppendToStreamResultWithGlobalPosition>;
|
|
598
|
+
consumer<ConsumerEventType extends Event = Event>(options?: PostgreSQLEventStoreConsumerConfig<ConsumerEventType>): PostgreSQLEventStoreConsumer<ConsumerEventType>;
|
|
599
|
+
close(): Promise<void>;
|
|
600
|
+
streamExists(streamName: string, options?: PostgresStreamExistsOptions): Promise<StreamExistsResult>;
|
|
601
|
+
schema: {
|
|
602
|
+
sql(): string;
|
|
603
|
+
print(): void;
|
|
604
|
+
migrate(options?: CreateEventStoreSchemaOptions): Promise<RunSQLMigrationsResult>;
|
|
605
|
+
dangerous: {
|
|
606
|
+
truncate(options?: {
|
|
607
|
+
resetSequences?: boolean;
|
|
608
|
+
truncateProjections?: boolean;
|
|
609
|
+
}): Promise<void>;
|
|
557
610
|
};
|
|
611
|
+
};
|
|
558
612
|
}
|
|
559
613
|
type PostgresReadEventMetadata = ReadEventMetadataWithGlobalPosition;
|
|
560
614
|
type PostgresReadEvent<EventType extends Event = Event> = ReadEvent<EventType, PostgresReadEventMetadata>;
|
|
561
615
|
type PostgresEventStorePooledOptions = {
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
616
|
+
connector?: PgDriverType;
|
|
617
|
+
connectionString?: string;
|
|
618
|
+
database?: string;
|
|
619
|
+
pooled: true;
|
|
620
|
+
pool: pg.Pool;
|
|
567
621
|
} | {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
622
|
+
connector?: PgDriverType;
|
|
623
|
+
connectionString?: string;
|
|
624
|
+
database?: string;
|
|
625
|
+
pool: pg.Pool;
|
|
572
626
|
} | {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
627
|
+
connector?: PgDriverType;
|
|
628
|
+
connectionString?: string;
|
|
629
|
+
database?: string;
|
|
630
|
+
pooled: true;
|
|
577
631
|
} | {
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
632
|
+
connector?: PgDriverType;
|
|
633
|
+
connectionString?: string;
|
|
634
|
+
database?: string;
|
|
581
635
|
};
|
|
582
636
|
type PostgresEventStoreNotPooledOptions = {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
637
|
+
connector?: PgDriverType;
|
|
638
|
+
connectionString?: string;
|
|
639
|
+
database?: string;
|
|
640
|
+
pooled: false;
|
|
641
|
+
client: pg.Client;
|
|
588
642
|
} | {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
643
|
+
connector?: PgDriverType;
|
|
644
|
+
connectionString?: string;
|
|
645
|
+
database?: string;
|
|
646
|
+
client: pg.Client;
|
|
593
647
|
} | {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
648
|
+
connector?: PgDriverType;
|
|
649
|
+
connectionString?: string;
|
|
650
|
+
database?: string;
|
|
651
|
+
pooled: false;
|
|
598
652
|
} | {
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
653
|
+
connector?: PgDriverType;
|
|
654
|
+
connectionString?: string;
|
|
655
|
+
database?: string;
|
|
656
|
+
connection: PgPoolClientConnection | PgClientConnection;
|
|
657
|
+
pooled?: false;
|
|
604
658
|
} | {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
659
|
+
connector?: PgDriverType;
|
|
660
|
+
connectionString?: string;
|
|
661
|
+
database?: string;
|
|
662
|
+
dumbo: PgPool;
|
|
663
|
+
pooled?: false;
|
|
610
664
|
};
|
|
611
665
|
type PostgresEventStoreConnectionOptions = PostgresEventStorePooledOptions | PostgresEventStoreNotPooledOptions;
|
|
612
666
|
type PostgresEventStoreOptions = {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
667
|
+
projections?: ProjectionRegistration<'inline', PostgresReadEventMetadata, PostgreSQLProjectionHandlerContext>[];
|
|
668
|
+
schema?: {
|
|
669
|
+
autoMigration?: MigrationStyle;
|
|
670
|
+
};
|
|
671
|
+
connectionOptions?: PostgresEventStoreConnectionOptions;
|
|
672
|
+
hooks?: {
|
|
673
|
+
/**
|
|
674
|
+
* This hook will be called **BEFORE** event store schema is created
|
|
675
|
+
*/
|
|
676
|
+
onBeforeSchemaCreated?: (context: PostgreSQLProjectionHandlerContext) => Promise<void> | void;
|
|
677
|
+
/**
|
|
678
|
+
* This hook will be called **AFTER** event store schema was created but before transaction commits
|
|
679
|
+
*/
|
|
680
|
+
onAfterSchemaCreated?: (context: PostgreSQLProjectionHandlerContext) => Promise<void> | void;
|
|
681
|
+
};
|
|
628
682
|
} & JSONSerializationOptions;
|
|
629
683
|
declare const defaultPostgreSQLOptions: PostgresEventStoreOptions;
|
|
630
684
|
declare const PostgreSQLEventStoreDefaultStreamVersion = 0n;
|
|
631
685
|
declare const getPostgreSQLEventStore: (connectionString: string, options?: PostgresEventStoreOptions) => PostgresEventStore;
|
|
632
|
-
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/eventStore/consumers/postgreSQLProcessor.d.ts
|
|
633
688
|
type PostgreSQLProcessorHandlerContext = {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
689
|
+
partition: string;
|
|
690
|
+
execute: SQLExecutor;
|
|
691
|
+
connection: {
|
|
692
|
+
connectionString: string;
|
|
693
|
+
client: PgClient;
|
|
694
|
+
transaction: PgTransaction;
|
|
695
|
+
pool: Dumbo;
|
|
696
|
+
messageStore: PostgresEventStore;
|
|
697
|
+
};
|
|
643
698
|
} & EventStoreSchemaMigrationOptions;
|
|
644
699
|
type PostgreSQLProcessor<MessageType extends Message = AnyMessage> = MessageProcessor<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
|
|
645
700
|
type PostgreSQLProcessorEachMessageHandler<MessageType extends Message = Message> = SingleRecordedMessageHandlerWithContext<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
|
|
646
701
|
type PostgreSQLProcessorEachBatchHandler<MessageType extends Message = Message> = BatchRecordedMessageHandlerWithContext<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
|
|
647
702
|
type PostgreSQLProcessorStartFrom = PostgreSQLEventStoreMessageBatchPullerStartFrom | 'CURRENT';
|
|
648
703
|
type PostgreSQLProcessorPooledOptions = {
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
704
|
+
connector?: PgDriverType;
|
|
705
|
+
database?: string;
|
|
706
|
+
pooled: true;
|
|
707
|
+
pool: pg.Pool;
|
|
653
708
|
} | {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
709
|
+
connector?: PgDriverType;
|
|
710
|
+
database?: string;
|
|
711
|
+
pool: pg.Pool;
|
|
657
712
|
} | {
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
713
|
+
connector?: PgDriverType;
|
|
714
|
+
database?: string;
|
|
715
|
+
pooled: true;
|
|
661
716
|
} | {
|
|
662
|
-
|
|
663
|
-
|
|
717
|
+
connector?: PgDriverType;
|
|
718
|
+
database?: string;
|
|
664
719
|
};
|
|
665
720
|
type PostgreSQLProcessorNotPooledOptions = {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
721
|
+
connector?: PgDriverType;
|
|
722
|
+
database?: string;
|
|
723
|
+
pooled: false;
|
|
724
|
+
client: pg.Client;
|
|
670
725
|
} | {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
726
|
+
connector?: PgDriverType;
|
|
727
|
+
database?: string;
|
|
728
|
+
client: pg.Client;
|
|
674
729
|
} | {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
730
|
+
connector?: PgDriverType;
|
|
731
|
+
database?: string;
|
|
732
|
+
pooled: false;
|
|
678
733
|
} | {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
734
|
+
connector?: PgDriverType;
|
|
735
|
+
database?: string;
|
|
736
|
+
connection: PgPoolClientConnection | PgClientConnection;
|
|
737
|
+
pooled?: false;
|
|
683
738
|
} | {
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
739
|
+
connector?: PgDriverType;
|
|
740
|
+
database?: string;
|
|
741
|
+
dumbo: PgPool;
|
|
742
|
+
pooled?: false;
|
|
688
743
|
};
|
|
689
744
|
type PostgreSQLProcessorConnectionOptions = {
|
|
690
|
-
|
|
745
|
+
connectionString: string;
|
|
691
746
|
} & (PostgreSQLProcessorPooledOptions | PostgreSQLProcessorNotPooledOptions);
|
|
692
747
|
type PostgreSQLCheckpointer<MessageType extends AnyMessage = AnyMessage> = Checkpointer<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>;
|
|
693
748
|
declare const postgreSQLCheckpointer: <MessageType extends Message = Message>() => PostgreSQLCheckpointer<MessageType>;
|
|
694
749
|
type PostgreSQLConnectionOptions = {
|
|
695
|
-
|
|
750
|
+
connectionOptions?: PostgreSQLProcessorConnectionOptions;
|
|
696
751
|
} & JSONSerializationOptions;
|
|
697
752
|
type PostgreSQLProcessorOptionsBase = PostgreSQLConnectionOptions & {
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
753
|
+
lock?: {
|
|
754
|
+
acquisitionPolicy?: LockAcquisitionPolicy;
|
|
755
|
+
timeoutSeconds?: number;
|
|
756
|
+
};
|
|
757
|
+
partition?: string;
|
|
703
758
|
};
|
|
704
759
|
type PostgreSQLReactorOptions<MessageType extends Message = Message, MessagePayloadType extends AnyMessage = MessageType> = ReactorOptions<MessageType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext, MessagePayloadType> & PostgreSQLProcessorOptionsBase;
|
|
705
760
|
type PostgreSQLProjectorOptions<EventType extends AnyEvent = AnyEvent, EventPayloadType extends Event = EventType> = ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext, EventPayloadType> & PostgreSQLProcessorOptionsBase & EventStoreSchemaMigrationOptions;
|
|
@@ -707,35 +762,38 @@ type PostgreSQLWorkflowProcessorOptions<Input extends AnyEvent | AnyCommand, Sta
|
|
|
707
762
|
declare const postgreSQLProjector: <EventType extends Event = Event, EventPayloadType extends Event = EventType>(options: PostgreSQLProjectorOptions<EventType, EventPayloadType>) => PostgreSQLProcessor<EventType>;
|
|
708
763
|
declare const postgreSQLWorkflowProcessor: <Input extends AnyEvent | AnyCommand, State, Output extends AnyEvent | AnyCommand, MetaDataType extends AnyRecordedMessageMetadata = AnyRecordedMessageMetadata, HandlerContext extends PostgreSQLProcessorHandlerContext & WorkflowProcessorContext = PostgreSQLProcessorHandlerContext & WorkflowProcessorContext, StoredMessage extends AnyEvent | AnyCommand = Output>(options: PostgreSQLWorkflowProcessorOptions<Input, State, Output, MetaDataType, HandlerContext, StoredMessage>) => PostgreSQLProcessor<Input | Output>;
|
|
709
764
|
declare const postgreSQLReactor: <MessageType extends Message = Message, MessagePayloadType extends AnyMessage = MessageType>(options: PostgreSQLReactorOptions<MessageType, MessagePayloadType>) => PostgreSQLProcessor<MessageType>;
|
|
710
|
-
|
|
765
|
+
//#endregion
|
|
766
|
+
//#region src/eventStore/consumers/postgreSQLEventStoreConsumer.d.ts
|
|
711
767
|
type PostgreSQLEventStoreConsumerConfig<ConsumerMessageType extends Message = any> = MessageConsumerOptions<ConsumerMessageType> & {
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
768
|
+
stopWhen?: {
|
|
769
|
+
noMessagesLeft?: boolean;
|
|
770
|
+
};
|
|
771
|
+
pulling?: {
|
|
772
|
+
batchSize?: number;
|
|
773
|
+
pullingFrequencyInMs?: number;
|
|
774
|
+
};
|
|
719
775
|
} & JSONSerializationOptions;
|
|
720
776
|
type PostgreSQLEventStoreConsumerOptions<ConsumerMessageType extends Message = Message> = PostgreSQLEventStoreConsumerConfig<ConsumerMessageType> & {
|
|
721
|
-
|
|
722
|
-
|
|
777
|
+
connectionString: string;
|
|
778
|
+
pool?: Dumbo;
|
|
723
779
|
};
|
|
724
780
|
type PostgreSQLEventStoreConsumer<ConsumerMessageType extends AnyMessage = any> = MessageConsumer<ConsumerMessageType> & Readonly<{
|
|
725
|
-
|
|
726
|
-
|
|
781
|
+
reactor: <MessageType extends AnyMessage = ConsumerMessageType>(options: PostgreSQLReactorOptions<MessageType>) => PostgreSQLProcessor<MessageType>;
|
|
782
|
+
workflowProcessor: <Input extends AnyEvent | AnyCommand, State, Output extends AnyEvent | AnyCommand, MetaDataType extends AnyRecordedMessageMetadata = AnyRecordedMessageMetadata, HandlerContext extends PostgreSQLProcessorHandlerContext & WorkflowProcessorContext = PostgreSQLProcessorHandlerContext & WorkflowProcessorContext, StoredMessage extends AnyEvent | AnyCommand = Output>(options: PostgreSQLWorkflowProcessorOptions<Input, State, Output, MetaDataType, HandlerContext, StoredMessage>) => PostgreSQLProcessor<Input | Output>;
|
|
727
783
|
}> & (AnyEvent extends ConsumerMessageType ? Readonly<{
|
|
728
|
-
|
|
784
|
+
projector: <EventType extends AnyEvent = ConsumerMessageType & AnyEvent>(options: PostgreSQLProjectorOptions<EventType>) => PostgreSQLProcessor<EventType>;
|
|
729
785
|
}> : object);
|
|
730
786
|
declare const postgreSQLEventStoreConsumer: <ConsumerMessageType extends Message = AnyMessage>(options: PostgreSQLEventStoreConsumerOptions<ConsumerMessageType>) => PostgreSQLEventStoreConsumer<ConsumerMessageType>;
|
|
731
|
-
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region src/eventStore/consumers/rebuildPostgreSQLProjections.d.ts
|
|
732
789
|
declare const rebuildPostgreSQLProjections: <EventType extends AnyEvent = AnyEvent>(options: Omit<PostgreSQLEventStoreConsumerOptions<EventType>, "stopWhen" | "processors"> & {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
790
|
+
lock?: {
|
|
791
|
+
acquisitionPolicy?: LockAcquisitionPolicy;
|
|
792
|
+
timeoutSeconds?: number;
|
|
793
|
+
};
|
|
737
794
|
} & ({
|
|
738
|
-
|
|
795
|
+
projections: (ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext> | PostgreSQLProjectionDefinition<EventType>)[];
|
|
739
796
|
} | ProjectorOptions<EventType, ReadEventMetadataWithGlobalPosition, PostgreSQLProcessorHandlerContext>)) => PostgreSQLEventStoreConsumer<EventType>;
|
|
740
|
-
|
|
741
|
-
export {
|
|
797
|
+
//#endregion
|
|
798
|
+
export { AppendToStreamBeforeCommitHook, CreateEventStoreSchemaOptions, DefaultPostgreSQLEventStoreProcessorBatchSize, DefaultPostgreSQLEventStoreProcessorPullingFrequencyInMs, DefaultPostgreSQLProcessorLockPolicy, EventStoreSchemaMigrationOptions, type LockAcquisitionPolicy, PongoAssertOptions, PongoDocumentEvolve, PongoMultiStreamProjectionOptions, PongoProjectionHandlerContext, PongoProjectionOptions, PongoSingleStreamProjectionOptions, PongoWithNotNullDocumentEvolve, PongoWithNullableDocumentEvolve, PostgreSQLCheckpointer, PostgreSQLEventStoreConsumer, PostgreSQLEventStoreConsumerConfig, PostgreSQLEventStoreConsumerOptions, PostgreSQLEventStoreDefaultStreamVersion, PostgreSQLEventStoreMessageBatchPuller, PostgreSQLEventStoreMessageBatchPullerOptions, PostgreSQLEventStoreMessageBatchPullerStartFrom, PostgreSQLEventStoreMessageBatchPullerStartOptions, PostgreSQLEventStoreMessagesBatchHandlerResult, PostgreSQLProcessor, PostgreSQLProcessorConnectionOptions, PostgreSQLProcessorEachBatchHandler, PostgreSQLProcessorEachMessageHandler, PostgreSQLProcessorHandlerContext, PostgreSQLProcessorLock, PostgreSQLProcessorLockContext, PostgreSQLProcessorLockOptions, PostgreSQLProcessorStartFrom, PostgreSQLProjectionAssert, PostgreSQLProjectionDefinition, PostgreSQLProjectionHandler, PostgreSQLProjectionHandlerContext, PostgreSQLProjectionHandlerOptions, PostgreSQLProjectionLock, PostgreSQLProjectionLockContext, PostgreSQLProjectionLockOptions, PostgreSQLProjectionSpec, PostgreSQLProjectionSpecEvent, PostgreSQLProjectionSpecOptions, PostgreSQLProjectionSpecWhenOptions, PostgreSQLProjectorOptions, PostgreSQLRawBatchSQLProjection, PostgreSQLRawSQLProjection, PostgreSQLReactorOptions, PostgreSQLWorkflowProcessorOptions, PostgresEventStore, PostgresEventStoreConnectionOptions, PostgresEventStoreOptions, PostgresReadEvent, PostgresReadEventMetadata, PostgresStreamExistsOptions, ReadLastMessageGlobalPositionResult, ReadMessagesBatchOptions, ReadMessagesBatchResult, ReadProcessorCheckpointResult, ReadProjectionInfoResult, StoreProcessorCheckpointResult, activateProjection, activateProjectionSQL, addDefaultPartitionSQL, addModuleForAllTenantsSQL, addModuleSQL, addPartitionSQL, addTablePartitions, addTenantForAllModulesSQL, addTenantSQL, appendToStream, appendToStreamSQL, assertSQLQueryResultMatches, callActivateProjection, callAppendToStream, callDeactivateProjection, callRegisterProjection, callReleaseProcessorLock, callStoreProcessorCheckpoint, callTryAcquireProcessorLock, callTryAcquireProjectionLock, cleanupLegacySubscriptionTables, createEventStoreSchema, deactivateProjection, deactivateProjectionSQL, defaultPostgreSQLOptions, defaultTag, documentDoesNotExist, documentExists, documentMatchingExists, documentsAreTheSame, documentsMatchingHaveCount, emmettPrefix, eventInStream, eventStoreSchemaMigrations, eventsInStream, expectPongoDocuments, expectSQL, getPostgreSQLEventStore, globalNames, globalTag, handleProjections, messagesTable, messagesTableSQL, newEventsInStream, pongoMultiStreamProjection, pongoProjection, pongoSingleStreamProjection, postgreSQLCheckpointer, postgreSQLEventStoreConsumer, postgreSQLEventStoreMessageBatchPuller, postgreSQLProcessorLock, postgreSQLProjection, postgreSQLProjectionLock, postgreSQLProjector, postgreSQLRawBatchSQLProjection, postgreSQLRawSQLProjection, postgreSQLReactor, postgreSQLWorkflowProcessor, processorsTable, processorsTableSQL, projectionsTable, projectionsTableSQL, readLastMessageGlobalPosition, readMessagesBatch, readProcessorCheckpoint, readProjectionInfo, readStream, rebuildPostgreSQLProjections, registerProjection, registerProjectionSQL, releaseProcessorLockSQL, sanitizeNameSQL, schemaMigration, schemaSQL, storeProcessorCheckpoint, storeSubscriptionCheckpointSQL, streamExists, streamsTable, streamsTableSQL, toProcessorLockKey, toProjectionLockKey, transactionToPostgreSQLProjectionHandlerContext, tryAcquireProcessorLockSQL, tryAcquireProjectionLockSQL, unknownTag, zipPostgreSQLEventStoreMessageBatchPullerStartFrom };
|
|
799
|
+
//# sourceMappingURL=index.d.cts.map
|