-
Notifications
You must be signed in to change notification settings - Fork 2
/
QDB.js
40 lines (29 loc) · 1.06 KB
/
QDB.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
QDB is built from the ground up by QSmally.
QDB © 2018-2021 by QSmally, all rights reserved.
Please report bugs by creating an issue on the repo.
Obviously the Node runtime (and all respective libraries)
are not created by myself, they're created by their
owners. All rights are reserved.
Qulity © 2021 by QSmally.
*/
const DataSchema = require("./lib/Utility/Schema");
module.exports = {
Connection: require("./lib/Connections/Connection"),
Pool: require("./lib/Connections/Pool"),
BackupManager: require("./lib/Connections/Backups/Manager"),
// Utility
Schema: DataSchema.Schema,
// Model bindings
model: id => {
if (typeof id !== "string") return null;
return DataSchema.modelStore.resolve(id);
},
// Order enumeration
// These are left out as strings to be as backwards- compatible
// as possible. As the previous version had just strings as inputs,
// this was necessary.
arbitrary: "arbitrary",
ascending: "ascending",
descending: "descending"
};