function DBRef(collection, oid, db, fields) {
	        if (!(this instanceof DBRef))
	            return new DBRef(collection, oid, db, fields);
	        // check if namespace has been provided
	        var parts = collection.split('.');
	        if (parts.length === 2) {
	            db = parts.shift();
	            // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
	            collection = parts.shift();
	        }
	        this.collection = collection;
	        this.oid = oid;
	        this.db = db;
	        this.fields = fields || {};
	    }
/**
	     * @param collection - the collection name.
	     * @param oid - the reference ObjectId.
	     * @param db - optional db name, if omitted the reference is local to the current db.
	     */
@param collection - the collection name.
@param oid - the reference ObjectId.
@param db - optional db name, if omitted the reference is local to the current db.
@param collection - the collection name . @param oid - the reference ObjectId . @param db - optional db name if omitted the reference is local to the current db .
function DBRef(collection, oid, db, fields) {
	        if (!(this instanceof DBRef))
	            return new DBRef(collection, oid, db, fields);
	        var parts = collection.split('.');
	        if (parts.length === 2) {
	            db = parts.shift();
	            collection = parts.shift();
	        }
	        this.collection = collection;
	        this.oid = oid;
	        this.db = db;
	        this.fields = fields || {};
	    }
function DBRef ( collection , oid , db , fields ) { if ( ! ( this instanceof DBRef ) ) return new DBRef ( collection , oid , db , fields ) ; var parts = collection . split ( '.' ) ; if ( parts . length === 2 ) { db = parts . shift ( ) ; collection = parts . shift ( ) ; } this . collection = collection ; this . oid = oid ; this . db = db ; this . fields = fields || { } ; }
@param collection - the collection name.
@param collection - the collection name .
// check if namespace has been provided // eslint-disable-next-line @typescript-eslint/no-non-null-assertion