@@ -54,7 +54,6 @@ export interface OpQueryOptions extends CommandOptions {
54
54
/** @internal */
55
55
export class Query {
56
56
ns : string ;
57
- query : Document ;
58
57
numberToSkip : number ;
59
58
numberToReturn : number ;
60
59
returnFieldSelector ?: Document ;
@@ -74,7 +73,7 @@ export class Query {
74
73
partial : boolean ;
75
74
documentsReturnedIn ?: string ;
76
75
77
- constructor ( public databaseName : string , query : Document , options : OpQueryOptions ) {
76
+ constructor ( public databaseName : string , public query : Document , options : OpQueryOptions ) {
78
77
// Basic options needed to be passed in
79
78
// TODO(NODE-3483): Replace with MongoCommandError
80
79
const ns = `${ databaseName } .$cmd` ;
@@ -92,7 +91,6 @@ export class Query {
92
91
93
92
// Basic options
94
93
this . ns = ns ;
95
- this . query = query ;
96
94
97
95
// Additional options
98
96
this . numberToSkip = options . numberToSkip || 0 ;
@@ -475,8 +473,6 @@ export interface OpMsgOptions {
475
473
476
474
/** @internal */
477
475
export class Msg {
478
- command : Document ;
479
- options : OpQueryOptions ;
480
476
requestId : number ;
481
477
serializeFunctions : boolean ;
482
478
ignoreUndefined : boolean ;
@@ -486,13 +482,16 @@ export class Msg {
486
482
moreToCome : boolean ;
487
483
exhaustAllowed : boolean ;
488
484
489
- constructor ( public databaseName : string , command : Document , options : OpQueryOptions ) {
485
+ constructor (
486
+ public databaseName : string ,
487
+ public command : Document ,
488
+ public options : OpQueryOptions
489
+ ) {
490
490
// Basic options needed to be passed in
491
491
if ( command == null )
492
492
throw new MongoInvalidArgumentError ( 'Query document must be specified for query' ) ;
493
493
494
494
// Basic options
495
- this . command = command ;
496
495
this . command . $db = databaseName ;
497
496
498
497
if ( options . readPreference && options . readPreference . mode !== ReadPreference . PRIMARY ) {
0 commit comments