marcidb-client 0.11.4 → 0.12.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 +4 -5
- package/bin/marci-generate-darwin-arm64 +0 -0
- package/bin/marci-generate-linux-x64 +0 -0
- package/bin/marci-generate-win32-x64.exe +0 -0
- package/bin/marci-migrate-darwin-arm64 +0 -0
- package/bin/marci-migrate-linux-x64 +0 -0
- package/bin/marci-migrate-win32-x64.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,11 +49,10 @@ import { marcidb } from "marcidb-client";
|
|
|
49
49
|
|
|
50
50
|
const db = marcidb("http://localhost:3000");
|
|
51
51
|
|
|
52
|
-
// Find
|
|
53
|
-
const users = await db.user.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
52
|
+
// Find — a chainable query; no select = id + every scalar
|
|
53
|
+
const users = await db.user.where({ name: { $startsWith: "A" } }).order("id", "desc").limit(20);
|
|
54
|
+
const named = await db.user.select({ id: true, name: true });
|
|
55
|
+
const one = await db.user.where({ id: 1 }).first();
|
|
57
56
|
|
|
58
57
|
// Insert
|
|
59
58
|
const id = await db.user.insert({
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|