correct export from read-only connection

This commit is contained in:
Jan Prochazka
2022-03-20 09:47:39 +01:00
parent 1a81952ce7
commit 6fb582249c
9 changed files with 85 additions and 20 deletions

View File

@@ -325,6 +325,18 @@ const driver = {
return { errorMessage: err.message };
}
},
readJsonQuery(pool, select, structure) {
const { collection, condition, sort } = select;
const db = pool.__getDatabase();
const res = db
.collection(collection)
.find(condition || {})
.sort(sort || {});
return res;
},
};
module.exports = driver;