4.0.22 • Published 3 years ago
wio.db v4.0.22
Yüklemek İçin
npm install wio.db
Uyarı || Warning
- Node sürümü 12'den büyük olması gerekli gereklidir.
- Node version must be greater than 12.
Change Log
- Removed
- \<db>.arrayHasValue method.
- JsonDatabase.DBCollection prop. (static)
- \<db>.totalDBSize prop.
- Added
- \<db>.filter method.
- \<db>.info prop.
- Options -> maxDataSize
- Data limit added.
- Updated
- \<db>.findAndDelete method.
Some bug fixed and performance improved.
Speed test
Nasıl Kullanılır? || how to use?
JS
const {
JsonDatabase,
YamlDatabase
} = require("wio.db");
const db = new JsonDatabase({
databasePath:"./databases/myJsonDatabase.json"
});
const yamldb = new YamlDatabase({
databasePath: "./databases/myYamlDatabase.yml"
});
// Data set | get
db.set("test", 1);
db.get("test");
db.fetch("test");
// Data exists
db.has("test");
db.exists("test");
// Get all data
db.all(5); || db.all();
db.fetchAll(5); || db.fetchAll();
// To JSON
db.toJson(5); || db.toJson();
// Delete data
db.delete("test");
db.deleteAll();
db.findAndDelete((element,db) => {
return element.ID.includes("test");
});
// Get data type
db.type("test"); // ---> number
// DB Array methods
db.push("testArray", 10);
db.pull("testArray", (element, index, array) => element < 10, true); // Multiple options = true. (default false)
db.valueArray();
db.keyArray();
// DB Math metods
db.math("test","*", 3);
db.add("test", 10);
db.substr("test", 5);
// DB Finding methods
db.includes("tes");
db.startsWith("t");
// Infos
console.log(db.size);
console.log(db.info);
// Destroy DB
db.destroy();
Bana ulaşabileceğiniz yerler. || Bugs report
4.0.22
3 years ago
4.0.21
3 years ago
4.0.19
4 years ago
4.0.20
4 years ago
4.0.18
4 years ago
4.0.17-beta.1
4 years ago
4.0.17-beta.2
4 years ago
4.0.16
4 years ago
4.0.17
4 years ago
4.0.15
4 years ago
4.0.14
4 years ago
4.0.13
4 years ago
4.0.12
4 years ago
4.0.11
4 years ago
4.0.10
4 years ago
4.0.9
4 years ago
4.0.8
4 years ago
4.0.5
4 years ago
4.0.7
4 years ago
4.0.6
4 years ago
4.0.4
4 years ago
4.0.3
4 years ago
4.0.2
4 years ago
4.0.1
4 years ago
4.0.0
4 years ago
3.0.9
4 years ago
3.0.8
4 years ago
3.0.7
4 years ago
3.0.6
4 years ago
3.0.5
4 years ago
3.0.4
4 years ago
3.0.3
4 years ago
3.0.2
4 years ago
3.0.1
4 years ago
3.0.0
4 years ago
2.0.7
4 years ago
2.0.6
4 years ago
2.0.8
4 years ago
2.0.5
4 years ago
2.0.4
4 years ago
2.0.3
4 years ago
2.0.1
4 years ago
1.0.6
4 years ago
2.0.0
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago