@wxn0brp/db 0.40.3 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -39
- package/dist/version.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,68 +1,67 @@
|
|
|
1
1
|
# <img src="https://raw.githubusercontent.com/wxn0brP/ValtheraDB/master/logo.svg" alt="ValtheraDB Logo" width="36" height="36"> ValtheraDB (@wxn0brp/db)
|
|
2
2
|
|
|
3
|
-
A lightweight file-based database management system that supports CRUD operations, custom queries and relations.
|
|
4
|
-
|
|
5
3
|
[](https://www.npmjs.com/package/@wxn0brp/db)
|
|
6
4
|
[](./LICENSE)
|
|
7
5
|
[](https://www.npmjs.com/package/@wxn0brp/db)
|
|
8
6
|
|
|
7
|
+
**Welcome to ValtheraDB – a modular, embedded database for developers who want to build their perfect data layer. With a familiar API and unparalleled flexibility, ValtheraDB empowers you to take control of your data storage.**
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
9
11
|
## Installation
|
|
10
12
|
|
|
11
13
|
To install the package, run:
|
|
12
14
|
|
|
13
15
|
```bash
|
|
16
|
+
# Using npm
|
|
14
17
|
npm install @wxn0brp/db
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Usage
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
# Or using yarn
|
|
20
|
+
yarn add @wxn0brp/db
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
# Or using bun
|
|
23
|
+
bun add @wxn0brp/db
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
```javascript
|
|
27
|
-
import { Valthera } from "@wxn0brp/db";
|
|
26
|
+
## Our Philosophy: Control and Flexibility
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
const db = new Valthera("./database");
|
|
28
|
+
In a world of one-size-fits-all solutions, ValtheraDB is different. We believe that you, the developer, should have the final say on how your data is managed. Our core philosophy is built on two pillars:
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
console.log(addResult); // { _id: "abcdefghi-4-9", name: "John Doe", age: 30 }
|
|
30
|
+
* **Unmatched Modularity:** The storage engine is just a plugin. Don't like JSON files? Use a single binary file, YAML, `localStorage`, or invent your own format. ValtheraDB's architecture is designed to adapt to your needs, not the other way around.
|
|
31
|
+
* **Pragmatic Power:** We provide powerful features like cross-database relations and a rich query API, but we keep it simple. ValtheraDB is designed for small to medium-sized applications where a custom-fit and developer experience are more important than supporting massive datasets.
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
const findResults = await db.find("users", {});
|
|
38
|
-
console.log(findResults); // [{ _id: "abcdefghi-4-9", name: "John Doe", age: 30 }]
|
|
33
|
+
## Who is ValtheraDB for?
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
const user = await db.findOne("users", { $gt: { age: 25 } });
|
|
42
|
-
console.log(user); // { _id: "abcdefghi-4-9", name: "John Doe", age: 30 }
|
|
35
|
+
ValtheraDB is a great fit if you are:
|
|
43
36
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
* A **Node.js or Bun developer** building a backend and wanting an easy-to-use, embedded database without the overhead of a separate database server.
|
|
38
|
+
* A **frontend developer** creating a Progressive Web App (PWA) that needs offline capabilities or complex client-side storage.
|
|
39
|
+
* An **Electron developer** who needs a straightforward way to store data locally in a desktop application.
|
|
40
|
+
* A **creative coder** who wants to experiment with unconventional storage methods for your projects.
|
|
47
41
|
|
|
48
|
-
|
|
49
|
-
const removeResult = await db.removeOne("users", { name: "John Doe" });
|
|
50
|
-
console.log(removeResult); // true
|
|
51
|
-
```
|
|
42
|
+
In short, if you value flexibility and control over rigid conventions, you'll feel right at home.
|
|
52
43
|
|
|
53
|
-
##
|
|
44
|
+
## Key Features at a Glance
|
|
54
45
|
|
|
55
|
-
|
|
46
|
+
* 🧱 **Pluggable Storage Engine:** Bring your own storage adapter.
|
|
47
|
+
* 🤝 **Powerful Cross-Database Relations:** Create relationships between data across entirely separate database instances.
|
|
48
|
+
* 🧠 **Familiar MongoDB-like API:** Start working quickly with an intuitive and expressive query language.
|
|
49
|
+
* 🌐 **Runs Everywhere:** Optimized for **Bun**, great with **Node.js**, and fully capable in the **browser**.
|
|
50
|
+
* 🚀 **Client-Server Ready:** Scale from an embedded solution to a client-server architecture when you need to.
|
|
51
|
+
* 🚫 **Zero Configuration:** Point it to a directory, and you're good to go.
|
|
56
52
|
|
|
57
|
-
|
|
53
|
+
## Where to Go Next?
|
|
58
54
|
|
|
59
|
-
- [
|
|
60
|
-
- [
|
|
61
|
-
- [
|
|
62
|
-
-
|
|
63
|
-
- [
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
55
|
+
- **Documentation Website**: [https://wxn0brp.github.io/ValtheraDB/](https://wxn0brp.github.io/ValtheraDB/)
|
|
56
|
+
- **[Getting Started](docs/getting_started.md):** Jump into our hands-on tutorial and build your first application with ValtheraDB.
|
|
57
|
+
- **[Core Concepts](docs/core_concepts.md):** Learn about the fundamental ideas that make ValtheraDB unique.
|
|
58
|
+
- **API Reference:**
|
|
59
|
+
- [Valthera Class](docs/valthera.md)
|
|
60
|
+
- [Relations](docs/relation.md)
|
|
61
|
+
- [Search Operators](docs/search_opts.md)
|
|
62
|
+
- [Update Operators](docs/updater.md)
|
|
63
|
+
- [Find Options](docs/find_opts.md)
|
|
64
|
+
- [Remote](docs/remote.md)
|
|
66
65
|
|
|
67
66
|
## License
|
|
68
67
|
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "0.
|
|
1
|
+
export const version = "0.41.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wxn0brp/db",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
|
+
"description": "A modular, embedded database for developers who want control over their data storage.",
|
|
4
5
|
"main": "dist/index.js",
|
|
5
6
|
"types": "dist/index.d.ts",
|
|
6
7
|
"author": "wxn0brP",
|
|
@@ -24,8 +25,8 @@
|
|
|
24
25
|
"lightweight"
|
|
25
26
|
],
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@wxn0brp/db-client": ">=0.2.
|
|
28
|
-
"@wxn0brp/db-core": ">=0.
|
|
28
|
+
"@wxn0brp/db-client": ">=0.2.3",
|
|
29
|
+
"@wxn0brp/db-core": ">=0.3.0",
|
|
29
30
|
"@wxn0brp/db-storage-dir": ">=0.1.4"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|