@event-driven-io/pongo 0.9.0 → 0.11.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/dist/chunk-J2SNQY3G.js +14 -0
- package/dist/chunk-J2SNQY3G.js.map +1 -0
- package/dist/chunk-X6KWR4EG.cjs +14 -0
- package/dist/chunk-X6KWR4EG.cjs.map +1 -0
- package/dist/index.cjs +1 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -308
- package/dist/index.d.ts +5 -308
- package/dist/index.js +1 -13
- package/dist/index.js.map +1 -1
- package/dist/pongoDb-C4vfKipo.d.cts +172 -0
- package/dist/pongoDb-C4vfKipo.d.ts +172 -0
- package/dist/shim/index.cjs +2 -0
- package/dist/shim/index.cjs.map +1 -0
- package/dist/shim/index.d.cts +145 -0
- package/dist/shim/index.d.ts +145 -0
- package/dist/shim/index.js +2 -0
- package/dist/shim/index.js.map +1 -0
- package/package.json +12 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SQLExecutor, SQL
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
1
|
+
import { SQLExecutor, SQL } from '@event-driven-io/dumbo';
|
|
2
|
+
import { P as PongoDb, a as PongoDocument, b as PongoCollection, W as WithId, c as PongoFilter, d as PongoUpdate, e as WithoutId, f as PongoTransactionOptions, g as PongoSession, h as PongoDbTransaction } from './pongoDb-C4vfKipo.cjs';
|
|
3
|
+
export { r as $inc, s as $push, $ as $set, q as $unset, A as AllowedDbClientOptions, C as CollectionOperationOptions, D as DocumentHandler, H as HasId, N as NotPooledPongoOptions, n as PongoClient, j as PongoClientOptions, l as PongoDbClientOptions, y as PongoDeleteManyResult, x as PongoDeleteResult, o as PongoFilterOperator, u as PongoInsertManyResult, t as PongoInsertOneResult, w as PongoUpdateManyResult, v as PongoUpdateResult, i as PooledPongoClientOptions, z as PostgresDbClientOptions, k as clientToDbOptions, m as getPongoDb, B as isPostgresClientOptions, p as pongoClient, E as postgresDb } from './pongoDb-C4vfKipo.cjs';
|
|
4
|
+
import 'pg';
|
|
5
5
|
|
|
6
6
|
type PongoCollectionOptions<ConnectorType extends string = string> = {
|
|
7
7
|
db: PongoDb<ConnectorType>;
|
|
@@ -49,165 +49,8 @@ declare const OperatorMap: {
|
|
|
49
49
|
declare const isOperator: (key: string) => boolean;
|
|
50
50
|
declare const hasOperators: (value: Record<string, unknown>) => boolean;
|
|
51
51
|
|
|
52
|
-
type PostgresDbClientOptions = PongoDbClientOptions<PostgresConnector> & PostgresPoolOptions;
|
|
53
|
-
declare const isPostgresClientOptions: (options: PongoDbClientOptions) => options is PostgresDbClientOptions;
|
|
54
|
-
declare const postgresDb: (options: PostgresDbClientOptions) => PongoDb<PostgresConnector>;
|
|
55
|
-
|
|
56
52
|
declare const postgresSQLBuilder: (collectionName: string) => PongoCollectionSQLBuilder;
|
|
57
53
|
|
|
58
|
-
interface PongoClient {
|
|
59
|
-
connect(): Promise<this>;
|
|
60
|
-
close(): Promise<void>;
|
|
61
|
-
db(dbName?: string): PongoDb;
|
|
62
|
-
startSession(): PongoSession;
|
|
63
|
-
withSession<T = unknown>(callback: (session: PongoSession) => Promise<T>): Promise<T>;
|
|
64
|
-
}
|
|
65
|
-
declare interface PongoTransactionOptions {
|
|
66
|
-
get snapshotEnabled(): boolean;
|
|
67
|
-
maxCommitTimeMS?: number;
|
|
68
|
-
}
|
|
69
|
-
interface PongoDbTransaction {
|
|
70
|
-
get databaseName(): string | null;
|
|
71
|
-
options: PongoTransactionOptions;
|
|
72
|
-
enlistDatabase: (database: PongoDb) => Promise<DatabaseTransaction>;
|
|
73
|
-
commit: () => Promise<void>;
|
|
74
|
-
rollback: (error?: unknown) => Promise<void>;
|
|
75
|
-
get sqlExecutor(): SQLExecutor;
|
|
76
|
-
get isStarting(): boolean;
|
|
77
|
-
get isActive(): boolean;
|
|
78
|
-
get isCommitted(): boolean;
|
|
79
|
-
}
|
|
80
|
-
interface PongoSession {
|
|
81
|
-
hasEnded: boolean;
|
|
82
|
-
explicit: boolean;
|
|
83
|
-
defaultTransactionOptions: PongoTransactionOptions;
|
|
84
|
-
transaction: PongoDbTransaction | null;
|
|
85
|
-
get snapshotEnabled(): boolean;
|
|
86
|
-
endSession(): Promise<void>;
|
|
87
|
-
incrementTransactionNumber(): void;
|
|
88
|
-
inTransaction(): boolean;
|
|
89
|
-
startTransaction(options?: PongoTransactionOptions): void;
|
|
90
|
-
commitTransaction(): Promise<void>;
|
|
91
|
-
abortTransaction(): Promise<void>;
|
|
92
|
-
withTransaction<T = unknown>(fn: (session: PongoSession) => Promise<T>, options?: PongoTransactionOptions): Promise<T>;
|
|
93
|
-
}
|
|
94
|
-
interface PongoDb<ConnectorType extends string = string> extends DatabaseTransactionFactory<ConnectorType> {
|
|
95
|
-
get connectorType(): ConnectorType;
|
|
96
|
-
get databaseName(): string;
|
|
97
|
-
connect(): Promise<void>;
|
|
98
|
-
close(): Promise<void>;
|
|
99
|
-
collection<T extends PongoDocument>(name: string): PongoCollection<T>;
|
|
100
|
-
}
|
|
101
|
-
type CollectionOperationOptions = {
|
|
102
|
-
session?: PongoSession;
|
|
103
|
-
};
|
|
104
|
-
interface PongoCollection<T extends PongoDocument> {
|
|
105
|
-
readonly dbName: string;
|
|
106
|
-
readonly collectionName: string;
|
|
107
|
-
createCollection(options?: CollectionOperationOptions): Promise<void>;
|
|
108
|
-
insertOne(document: T, options?: CollectionOperationOptions): Promise<PongoInsertOneResult>;
|
|
109
|
-
insertMany(documents: T[], options?: CollectionOperationOptions): Promise<PongoInsertManyResult>;
|
|
110
|
-
updateOne(filter: PongoFilter<T>, update: PongoUpdate<T>, options?: CollectionOperationOptions): Promise<PongoUpdateResult>;
|
|
111
|
-
replaceOne(filter: PongoFilter<T>, document: WithoutId<T>, options?: CollectionOperationOptions): Promise<PongoUpdateResult>;
|
|
112
|
-
updateMany(filter: PongoFilter<T>, update: PongoUpdate<T>, options?: CollectionOperationOptions): Promise<PongoUpdateResult>;
|
|
113
|
-
deleteOne(filter?: PongoFilter<T>, options?: CollectionOperationOptions): Promise<PongoDeleteResult>;
|
|
114
|
-
deleteMany(filter?: PongoFilter<T>, options?: CollectionOperationOptions): Promise<PongoDeleteResult>;
|
|
115
|
-
findOne(filter?: PongoFilter<T>, options?: CollectionOperationOptions): Promise<T | null>;
|
|
116
|
-
find(filter?: PongoFilter<T>, options?: CollectionOperationOptions): Promise<T[]>;
|
|
117
|
-
findOneAndDelete(filter: PongoFilter<T>, options?: CollectionOperationOptions): Promise<T | null>;
|
|
118
|
-
findOneAndReplace(filter: PongoFilter<T>, replacement: WithoutId<T>, options?: CollectionOperationOptions): Promise<T | null>;
|
|
119
|
-
findOneAndUpdate(filter: PongoFilter<T>, update: PongoUpdate<T>, options?: CollectionOperationOptions): Promise<T | null>;
|
|
120
|
-
countDocuments(filter?: PongoFilter<T>, options?: CollectionOperationOptions): Promise<number>;
|
|
121
|
-
drop(options?: CollectionOperationOptions): Promise<boolean>;
|
|
122
|
-
rename(newName: string, options?: CollectionOperationOptions): Promise<PongoCollection<T>>;
|
|
123
|
-
handle(id: string, handle: DocumentHandler<T>, options?: CollectionOperationOptions): Promise<T | null>;
|
|
124
|
-
}
|
|
125
|
-
type HasId = {
|
|
126
|
-
_id: string;
|
|
127
|
-
};
|
|
128
|
-
type WithId<T> = T & HasId;
|
|
129
|
-
type WithoutId<T> = Omit<T, '_id'>;
|
|
130
|
-
type PongoFilter<T> = {
|
|
131
|
-
[P in keyof T]?: T[P] | PongoFilterOperator<T[P]>;
|
|
132
|
-
} | HasId;
|
|
133
|
-
type PongoFilterOperator<T> = {
|
|
134
|
-
$eq?: T;
|
|
135
|
-
$gt?: T;
|
|
136
|
-
$gte?: T;
|
|
137
|
-
$lt?: T;
|
|
138
|
-
$lte?: T;
|
|
139
|
-
$ne?: T;
|
|
140
|
-
$in?: T[];
|
|
141
|
-
$nin?: T[];
|
|
142
|
-
};
|
|
143
|
-
type $set<T> = Partial<T>;
|
|
144
|
-
type $unset<T> = {
|
|
145
|
-
[P in keyof T]?: '';
|
|
146
|
-
};
|
|
147
|
-
type $inc<T> = {
|
|
148
|
-
[P in keyof T]?: number;
|
|
149
|
-
};
|
|
150
|
-
type $push<T> = {
|
|
151
|
-
[P in keyof T]?: T[P];
|
|
152
|
-
};
|
|
153
|
-
type PongoUpdate<T> = {
|
|
154
|
-
$set?: Partial<T>;
|
|
155
|
-
$unset?: $unset<T>;
|
|
156
|
-
$inc?: $inc<T>;
|
|
157
|
-
$push?: $push<T>;
|
|
158
|
-
};
|
|
159
|
-
interface PongoInsertOneResult {
|
|
160
|
-
insertedId: string | null;
|
|
161
|
-
acknowledged: boolean;
|
|
162
|
-
}
|
|
163
|
-
interface PongoInsertManyResult {
|
|
164
|
-
acknowledged: boolean;
|
|
165
|
-
insertedIds: string[];
|
|
166
|
-
insertedCount: number;
|
|
167
|
-
}
|
|
168
|
-
interface PongoUpdateResult {
|
|
169
|
-
acknowledged: boolean;
|
|
170
|
-
modifiedCount: number;
|
|
171
|
-
}
|
|
172
|
-
interface PongoUpdateManyResult {
|
|
173
|
-
acknowledged: boolean;
|
|
174
|
-
modifiedCount: number;
|
|
175
|
-
}
|
|
176
|
-
interface PongoDeleteResult {
|
|
177
|
-
acknowledged: boolean;
|
|
178
|
-
deletedCount: number;
|
|
179
|
-
}
|
|
180
|
-
interface PongoDeleteManyResult {
|
|
181
|
-
acknowledged: boolean;
|
|
182
|
-
deletedCount: number;
|
|
183
|
-
}
|
|
184
|
-
type PongoDocument = Record<string, unknown>;
|
|
185
|
-
type DocumentHandler<T extends PongoDocument> = ((document: T | null) => T | null) | ((document: T | null) => Promise<T | null>);
|
|
186
|
-
|
|
187
|
-
type PooledPongoClientOptions = {
|
|
188
|
-
pool: pg.Pool;
|
|
189
|
-
} | {
|
|
190
|
-
pooled: true;
|
|
191
|
-
} | {
|
|
192
|
-
pool: pg.Pool;
|
|
193
|
-
pooled: true;
|
|
194
|
-
} | {};
|
|
195
|
-
type NotPooledPongoOptions = {
|
|
196
|
-
client: pg.Client;
|
|
197
|
-
} | {
|
|
198
|
-
pooled: false;
|
|
199
|
-
} | {
|
|
200
|
-
client: pg.Client;
|
|
201
|
-
pooled: false;
|
|
202
|
-
};
|
|
203
|
-
type PongoClientOptions = PooledPongoClientOptions | NotPooledPongoOptions;
|
|
204
|
-
declare const pongoClient: <DbClientOptions extends PostgresDbClientOptions = PostgresDbClientOptions>(connectionString: string, options?: PongoClientOptions) => PongoClient;
|
|
205
|
-
declare const clientToDbOptions: <DbClientOptions extends PostgresDbClientOptions = PostgresDbClientOptions>(options: {
|
|
206
|
-
connectionString: string;
|
|
207
|
-
dbName?: string;
|
|
208
|
-
clientOptions: PongoClientOptions;
|
|
209
|
-
}) => DbClientOptions;
|
|
210
|
-
|
|
211
54
|
type Entry<T> = {
|
|
212
55
|
[K in keyof Required<T>]: [K, Required<T>[K]];
|
|
213
56
|
}[keyof Required<T>];
|
|
@@ -219,14 +62,6 @@ type NonPartial<T> = {
|
|
|
219
62
|
[K in keyof Required<T>]: T[K];
|
|
220
63
|
};
|
|
221
64
|
|
|
222
|
-
type PongoDbClientOptions<ConnectorType extends string = string> = {
|
|
223
|
-
connectorType: ConnectorType;
|
|
224
|
-
connectionString: string;
|
|
225
|
-
dbName: string | undefined;
|
|
226
|
-
};
|
|
227
|
-
type AllowedDbClientOptions = PostgresDbClientOptions;
|
|
228
|
-
declare const getPongoDb: <DbClientOptions extends PostgresDbClientOptions = PostgresDbClientOptions>(options: DbClientOptions) => PongoDb;
|
|
229
|
-
|
|
230
65
|
type PongoSessionOptions = {
|
|
231
66
|
explicit?: boolean;
|
|
232
67
|
defaultTransactionOptions: PongoTransactionOptions;
|
|
@@ -235,142 +70,4 @@ declare const pongoSession: (options?: PongoSessionOptions) => PongoSession;
|
|
|
235
70
|
|
|
236
71
|
declare const pongoTransaction: (options: PongoTransactionOptions) => PongoDbTransaction;
|
|
237
72
|
|
|
238
|
-
|
|
239
|
-
private findDocumentsPromise;
|
|
240
|
-
private documents;
|
|
241
|
-
private index;
|
|
242
|
-
constructor(documents: Promise<T[]>);
|
|
243
|
-
toArray(): Promise<T[]>;
|
|
244
|
-
forEach(callback: (doc: T) => void): Promise<void>;
|
|
245
|
-
hasNext(): boolean;
|
|
246
|
-
next(): Promise<T | null>;
|
|
247
|
-
private findDocuments;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
declare class Db {
|
|
251
|
-
private pongoDb;
|
|
252
|
-
constructor(pongoDb: PongoDb);
|
|
253
|
-
get databaseName(): string;
|
|
254
|
-
collection<T extends Document>(collectionName: string): Collection$1<T> & {
|
|
255
|
-
handle(id: ObjectId$1, handle: DocumentHandler<T>): Promise<T | null>;
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
declare class MongoClient {
|
|
260
|
-
private pongoClient;
|
|
261
|
-
constructor(connectionString: string, options?: PongoClientOptions);
|
|
262
|
-
connect(): Promise<this>;
|
|
263
|
-
close(): Promise<void>;
|
|
264
|
-
db(dbName?: string): Db;
|
|
265
|
-
startSession(_options?: ClientSessionOptions): ClientSession;
|
|
266
|
-
withSession<T = any>(_executor: WithSessionCallback<T>): Promise<T>;
|
|
267
|
-
withSession<T = any>(_options: ClientSessionOptions, _executor: WithSessionCallback<T>): Promise<T>;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
declare class Collection<T extends Document> implements Collection$1<T> {
|
|
271
|
-
private collection;
|
|
272
|
-
constructor(collection: PongoCollection<T>);
|
|
273
|
-
get dbName(): string;
|
|
274
|
-
get collectionName(): string;
|
|
275
|
-
get namespace(): string;
|
|
276
|
-
get readConcern(): ReadConcern | undefined;
|
|
277
|
-
get readPreference(): ReadPreference | undefined;
|
|
278
|
-
get bsonOptions(): BSONSerializeOptions;
|
|
279
|
-
get writeConcern(): WriteConcern | undefined;
|
|
280
|
-
get hint(): Hint | undefined;
|
|
281
|
-
set hint(v: Hint | undefined);
|
|
282
|
-
insertOne(doc: OptionalUnlessRequiredId<T>, options?: InsertOneOptions | undefined): Promise<InsertOneResult<T>>;
|
|
283
|
-
insertMany(docs: OptionalUnlessRequiredId<T>[], options?: BulkWriteOptions | undefined): Promise<InsertManyResult<T>>;
|
|
284
|
-
bulkWrite(_operations: AnyBulkWriteOperation<T>[], _options?: BulkWriteOptions | undefined): Promise<BulkWriteResult>;
|
|
285
|
-
updateOne(filter: Filter<T>, update: Document[] | UpdateFilter<T>, options?: UpdateOptions | undefined): Promise<UpdateResult<T>>;
|
|
286
|
-
replaceOne(filter: Filter<T>, document: WithoutId$1<T>, options?: ReplaceOptions | undefined): Promise<Document | UpdateResult<T>>;
|
|
287
|
-
updateMany(filter: Filter<T>, update: Document[] | UpdateFilter<T>, options?: UpdateOptions | undefined): Promise<UpdateResult<T>>;
|
|
288
|
-
deleteOne(filter?: Filter<T> | undefined, options?: DeleteOptions | undefined): Promise<DeleteResult>;
|
|
289
|
-
deleteMany(filter?: Filter<T> | undefined, options?: DeleteOptions | undefined): Promise<DeleteResult>;
|
|
290
|
-
rename(newName: string, options?: RenameOptions | undefined): Promise<Collection<Document>>;
|
|
291
|
-
drop(options?: DropCollectionOptions | undefined): Promise<boolean>;
|
|
292
|
-
findOne(): Promise<WithId$1<T> | null>;
|
|
293
|
-
findOne(filter: Filter<T>): Promise<WithId$1<T> | null>;
|
|
294
|
-
findOne(filter: Filter<T>, options: FindOptions<Document>): Promise<WithId$1<T> | null>;
|
|
295
|
-
findOne<TS = T>(): Promise<TS | null>;
|
|
296
|
-
findOne<TS = T>(filter: Filter<TS>): Promise<TS | null>;
|
|
297
|
-
findOne<TS = T>(filter: Filter<TS>, options?: FindOptions<Document> | undefined): Promise<TS | null>;
|
|
298
|
-
find(): FindCursor$1<WithId$1<T>>;
|
|
299
|
-
find(filter: Filter<T>, options?: FindOptions<Document> | undefined): FindCursor$1<WithId$1<T>>;
|
|
300
|
-
find<T extends Document>(filter: Filter<T>, options?: FindOptions<Document> | undefined): FindCursor$1<T>;
|
|
301
|
-
options(_options?: OperationOptions | undefined): Promise<Document>;
|
|
302
|
-
isCapped(_options?: OperationOptions | undefined): Promise<boolean>;
|
|
303
|
-
createIndex(_indexSpec: IndexSpecification, _options?: CreateIndexesOptions | undefined): Promise<string>;
|
|
304
|
-
createIndexes(_indexSpecs: IndexDescription[], _options?: CreateIndexesOptions | undefined): Promise<string[]>;
|
|
305
|
-
dropIndex(_indexName: string, _options?: CommandOperationOptions | undefined): Promise<Document>;
|
|
306
|
-
dropIndexes(_options?: CommandOperationOptions | undefined): Promise<boolean>;
|
|
307
|
-
listIndexes(_options?: AbstractCursorOptions | undefined): ListIndexesCursor;
|
|
308
|
-
indexExists(_indexes: string | string[], _options?: AbstractCursorOptions | undefined): Promise<boolean>;
|
|
309
|
-
indexInformation(options: IndexInformationOptions & {
|
|
310
|
-
full: true;
|
|
311
|
-
}): Promise<IndexDescriptionInfo[]>;
|
|
312
|
-
indexInformation(options: IndexInformationOptions & {
|
|
313
|
-
full?: false | undefined;
|
|
314
|
-
}): Promise<IndexDescriptionCompact>;
|
|
315
|
-
indexInformation(options: IndexInformationOptions): Promise<IndexDescriptionCompact | IndexDescriptionInfo[]>;
|
|
316
|
-
indexInformation(): Promise<IndexDescriptionCompact>;
|
|
317
|
-
estimatedDocumentCount(options?: EstimatedDocumentCountOptions | undefined): Promise<number>;
|
|
318
|
-
countDocuments(filter?: Filter<T> | undefined, options?: CountDocumentsOptions | undefined): Promise<number>;
|
|
319
|
-
distinct<Key extends '_id' | keyof EnhancedOmit<T, '_id'>>(key: Key): Promise<Flatten<WithId$1<T>[Key]>[]>;
|
|
320
|
-
distinct<Key extends '_id' | keyof EnhancedOmit<T, '_id'>>(key: Key, filter: Filter<T>): Promise<Flatten<WithId$1<T>[Key]>[]>;
|
|
321
|
-
distinct<Key extends '_id' | keyof EnhancedOmit<T, '_id'>>(key: Key, filter: Filter<T>, options: CommandOperationOptions): Promise<Flatten<WithId$1<T>[Key]>[]>;
|
|
322
|
-
distinct(key: string): Promise<any[]>;
|
|
323
|
-
distinct(key: string, filter: Filter<T>): Promise<any[]>;
|
|
324
|
-
distinct(key: string, filter: Filter<T>, options: CommandOperationOptions): Promise<any[]>;
|
|
325
|
-
indexes(options: IndexInformationOptions & {
|
|
326
|
-
full?: true | undefined;
|
|
327
|
-
}): Promise<IndexDescriptionInfo[]>;
|
|
328
|
-
indexes(options: IndexInformationOptions & {
|
|
329
|
-
full: false;
|
|
330
|
-
}): Promise<IndexDescriptionCompact>;
|
|
331
|
-
indexes(options: IndexInformationOptions): Promise<IndexDescriptionCompact | IndexDescriptionInfo[]>;
|
|
332
|
-
indexes(options?: AbstractCursorOptions | undefined): Promise<IndexDescriptionInfo[]>;
|
|
333
|
-
findOneAndDelete(filter: Filter<T>, options: FindOneAndDeleteOptions & {
|
|
334
|
-
includeResultMetadata: true;
|
|
335
|
-
}): Promise<ModifyResult<T>>;
|
|
336
|
-
findOneAndDelete(filter: Filter<T>, options: FindOneAndDeleteOptions & {
|
|
337
|
-
includeResultMetadata: false;
|
|
338
|
-
}): Promise<WithId$1<T> | null>;
|
|
339
|
-
findOneAndDelete(filter: Filter<T>, options: FindOneAndDeleteOptions): Promise<WithId$1<T> | null>;
|
|
340
|
-
findOneAndDelete(filter: Filter<T>): Promise<WithId$1<T> | null>;
|
|
341
|
-
findOneAndReplace(filter: Filter<T>, replacement: WithoutId$1<T>, options: FindOneAndReplaceOptions & {
|
|
342
|
-
includeResultMetadata: true;
|
|
343
|
-
}): Promise<ModifyResult<T>>;
|
|
344
|
-
findOneAndReplace(filter: Filter<T>, replacement: WithoutId$1<T>, options: FindOneAndReplaceOptions & {
|
|
345
|
-
includeResultMetadata: false;
|
|
346
|
-
}): Promise<WithId$1<T> | null>;
|
|
347
|
-
findOneAndReplace(filter: Filter<T>, replacement: WithoutId$1<T>, options: FindOneAndReplaceOptions): Promise<WithId$1<T> | null>;
|
|
348
|
-
findOneAndReplace(filter: Filter<T>, replacement: WithoutId$1<T>): Promise<WithId$1<T> | null>;
|
|
349
|
-
findOneAndUpdate(filter: Filter<T>, update: UpdateFilter<T>, options: FindOneAndUpdateOptions & {
|
|
350
|
-
includeResultMetadata: true;
|
|
351
|
-
}): Promise<ModifyResult<T>>;
|
|
352
|
-
findOneAndUpdate(filter: Filter<T>, update: UpdateFilter<T>, options: FindOneAndUpdateOptions & {
|
|
353
|
-
includeResultMetadata: false;
|
|
354
|
-
}): Promise<WithId$1<T> | null>;
|
|
355
|
-
findOneAndUpdate(filter: Filter<T>, update: UpdateFilter<T>, options: FindOneAndUpdateOptions): Promise<WithId$1<T> | null>;
|
|
356
|
-
findOneAndUpdate(filter: Filter<T>, update: UpdateFilter<T>): Promise<WithId$1<T> | null>;
|
|
357
|
-
aggregate<T extends Document = Document>(_pipeline?: Document[] | undefined, _options?: AggregateOptions | undefined): AggregationCursor<T>;
|
|
358
|
-
watch<TLocal extends Document = T, TChange extends Document = ChangeStreamDocument<TLocal>>(_pipeline?: Document[] | undefined, _options?: ChangeStreamOptions | undefined): ChangeStream<TLocal, TChange>;
|
|
359
|
-
initializeUnorderedBulkOp(_options?: BulkWriteOptions | undefined): UnorderedBulkOperation;
|
|
360
|
-
initializeOrderedBulkOp(_options?: BulkWriteOptions | undefined): OrderedBulkOperation;
|
|
361
|
-
count(filter?: Filter<T> | undefined, options?: CountOptions | undefined): Promise<number>;
|
|
362
|
-
listSearchIndexes(options?: ListSearchIndexesOptions | undefined): ListSearchIndexesCursor;
|
|
363
|
-
listSearchIndexes(name: string, options?: ListSearchIndexesOptions | undefined): ListSearchIndexesCursor;
|
|
364
|
-
createSearchIndex(_description: SearchIndexDescription): Promise<string>;
|
|
365
|
-
createSearchIndexes(_descriptions: SearchIndexDescription[]): Promise<string[]>;
|
|
366
|
-
dropSearchIndex(_name: string): Promise<void>;
|
|
367
|
-
updateSearchIndex(_name: string, _definition: Document): Promise<void>;
|
|
368
|
-
createCollection(): Promise<void>;
|
|
369
|
-
handle(id: ObjectId$1, handle: DocumentHandler<T>): Promise<T | null>;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
type ObjectId = string & {
|
|
373
|
-
__brandId: 'ObjectId';
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
export { type $inc, type $push, type $set, type $unset, type AllowedDbClientOptions, Collection, type CollectionOperationOptions, Db, type DocumentHandler, FindCursor, type HasId, MongoClient, type NonPartial, type NotPooledPongoOptions, type ObjectId, OperatorMap, type PongoClient, type PongoClientOptions, type PongoCollection, type PongoCollectionOptions, type PongoCollectionSQLBuilder, type PongoDb, type PongoDbClientOptions, type PongoDbTransaction, type PongoDeleteManyResult, type PongoDeleteResult, type PongoDocument, type PongoFilter, type PongoFilterOperator, type PongoInsertManyResult, type PongoInsertOneResult, type PongoSession, type PongoSessionOptions, type PongoTransactionOptions, type PongoUpdate, type PongoUpdateManyResult, type PongoUpdateResult, type PooledPongoClientOptions, type PostgresDbClientOptions, QueryOperators, type WithId, type WithoutId, clientToDbOptions, entries, getPongoDb, hasOperators, isOperator, isPostgresClientOptions, pongoClient, pongoCollection, pongoSession, pongoTransaction, postgresDb, postgresSQLBuilder };
|
|
73
|
+
export { type NonPartial, OperatorMap, PongoCollection, type PongoCollectionOptions, type PongoCollectionSQLBuilder, PongoDb, PongoDbTransaction, PongoDocument, PongoFilter, PongoSession, type PongoSessionOptions, PongoTransactionOptions, PongoUpdate, QueryOperators, WithId, WithoutId, entries, hasOperators, isOperator, pongoCollection, pongoSession, pongoTransaction, postgresSQLBuilder };
|