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

@ -2,4 +2,5 @@ export { MessageBroker, BrokerOptions } from './src/MessageBroker.js';
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 { FieldInfo, OkPacket, Query, QueryOptions, Connection, PoolConnection, PoolCluster, MysqlError, Types } from 'mysql';
export { ConsumeMessage } from 'amqplib';

View File

@ -362,7 +362,7 @@ class MessageBroker
assertQueue (queue: string, opts?: QueueDef)
{
if (!this.#channel)
if (!this.#channel)
throw new Error('Channel doesn\'t exist');
return this.#channel.assertQueue(queue, opts);
}

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)}`);