fixes
This commit is contained in:
parent
c0e5d2482a
commit
d8008ba418
3
index.ts
3
index.ts
@ -2,4 +2,5 @@ export { MessageBroker, BrokerOptions } from './src/MessageBroker.js';
|
|||||||
export { MariaDB, MariaOptions } from './src/MariaDB.js';
|
export { MariaDB, MariaOptions } from './src/MariaDB.js';
|
||||||
export { MongoDB, MongoOptions } from './src/MongoDB.js';
|
export { MongoDB, MongoOptions } from './src/MongoDB.js';
|
||||||
export { ObjectId, Document, DeleteResult, Collection, Filter, UpdateFilter, MongoServerError } from 'mongodb';
|
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';
|
@ -362,7 +362,7 @@ class MessageBroker
|
|||||||
|
|
||||||
assertQueue (queue: string, opts?: QueueDef)
|
assertQueue (queue: string, opts?: QueueDef)
|
||||||
{
|
{
|
||||||
if (!this.#channel)
|
if (!this.#channel)
|
||||||
throw new Error('Channel doesn\'t exist');
|
throw new Error('Channel doesn\'t exist');
|
||||||
return this.#channel.assertQueue(queue, opts);
|
return this.#channel.assertQueue(queue, opts);
|
||||||
}
|
}
|
||||||
|
@ -200,7 +200,7 @@ class MongoDB
|
|||||||
if (typeof db !== 'string')
|
if (typeof db !== 'string')
|
||||||
throw new TypeError('Expecting collection name for the first argument');
|
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);
|
query._id = new ObjectId(query._id);
|
||||||
|
|
||||||
this.#logger.debug(`Incoming findOne query for ${db} with parameters ${inspect(query)}`);
|
this.#logger.debug(`Incoming findOne query for ${db} with parameters ${inspect(query)}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user