|
|
@ -105,25 +105,25 @@ declare class Nedb<Schema = Record<string, any>> extends EventEmitter { |
|
|
|
projection?: any |
|
|
|
projection?: any |
|
|
|
): Nedb.Cursor<T>; |
|
|
|
): Nedb.Cursor<T>; |
|
|
|
|
|
|
|
|
|
|
|
update<T extends Schema>( |
|
|
|
update<T extends Schema, O extends Nedb.UpdateOptions>( |
|
|
|
query: any, |
|
|
|
query: any, |
|
|
|
updateQuery: any, |
|
|
|
updateQuery: any, |
|
|
|
options?: Nedb.UpdateOptions, |
|
|
|
options?: O, |
|
|
|
callback?: ( |
|
|
|
callback?: ( |
|
|
|
err: Error | null, |
|
|
|
err: Error | null, |
|
|
|
numberOfUpdated: number, |
|
|
|
numberOfUpdated: number, |
|
|
|
affectedDocuments: Document<T> | Document<T>[] | null, |
|
|
|
affectedDocuments: O['returnUpdatedDocs'] extends true ? O['multi'] extends true ? Document<T>[] | null : Document<T> | null : null, |
|
|
|
upsert: boolean | null |
|
|
|
upsert: boolean | null |
|
|
|
) => void |
|
|
|
) => void |
|
|
|
): void; |
|
|
|
): void; |
|
|
|
|
|
|
|
|
|
|
|
updateAsync<T extends Schema>( |
|
|
|
updateAsync<T extends Schema, O extends Nedb.UpdateOptions>( |
|
|
|
query: any, |
|
|
|
query: any, |
|
|
|
updateQuery: any, |
|
|
|
updateQuery: any, |
|
|
|
options?: Nedb.UpdateOptions |
|
|
|
options?: O |
|
|
|
): Promise<{ |
|
|
|
): Promise<{ |
|
|
|
numAffected: number; |
|
|
|
numAffected: number; |
|
|
|
affectedDocuments: Document<T> | Document<T>[] | null; |
|
|
|
affectedDocuments: O['returnUpdatedDocs'] extends true ? O['multi'] extends true ? Document<T>[] | null : Document<T> | null : null; |
|
|
|
upsert: boolean; |
|
|
|
upsert: boolean; |
|
|
|
}>; |
|
|
|
}>; |
|
|
|
|
|
|
|
|
|
|
|