File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
- import { OperationBase } from './operation' ;
2
1
import type { Callback } from '../utils' ;
3
- import { Document , resolveBSONOptions } from '../bson' ;
2
+ import type { Document } from '../bson' ;
4
3
import type { Collection } from '../collection' ;
5
4
import type { FindOptions } from './find' ;
6
5
import { MongoError } from '../error' ;
7
6
import type { Server } from '../sdam/server' ;
7
+ import { CommandOperation } from './command' ;
8
8
9
9
/** @internal */
10
- export class FindOneOperation extends OperationBase < FindOptions , Document > {
10
+ export class FindOneOperation extends CommandOperation < FindOptions , Document > {
11
11
collection : Collection ;
12
12
query : Document ;
13
13
14
14
constructor ( collection : Collection , query : Document , options : FindOptions ) {
15
- super ( options ) ;
15
+ super ( collection , options ) ;
16
16
17
17
this . collection = collection ;
18
18
this . query = query ;
19
-
20
- // Assign BSON serialize options to OperationBase, preferring options over collection options
21
- this . bsonOptions = resolveBSONOptions ( options , collection ) ;
22
19
}
23
20
24
21
execute ( server : Server , callback : Callback < Document > ) : void {
You can’t perform that action at this time.
0 commit comments