This commit is contained in:
Erik 2023-08-22 21:35:04 +03:00
parent c0e5d2482a
commit d8008ba418
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68
3 changed files with 4 additions and 3 deletions

View File

@ -3,3 +3,4 @@ export { MariaDB, MariaOptions } from './src/MariaDB.js';
export { MongoDB, MongoOptions } from './src/MongoDB.js';
export { ObjectId, Document, DeleteResult, Collection, Filter, UpdateFilter, MongoServerError } from 'mongodb';
export { FieldInfo, OkPacket, Query, QueryOptions, Connection, PoolConnection, PoolCluster, MysqlError, Types } from 'mysql';
export { ConsumeMessage } from 'amqplib';

View File

@ -200,7 +200,7 @@ class MongoDB
if (typeof db !== 'string')
throw new TypeError('Expecting collection name for the first argument');
if (typeof query._id === 'string' && query._id.length === 12)
if (typeof query._id === 'string')
query._id = new ObjectId(query._id);
this.#logger.debug(`Incoming findOne query for ${db} with parameters ${inspect(query)}`);