mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 07:56:01 +00:00
correct export from read-only connection
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user