add readme
This commit is contained in:
parent
fc701bec68
commit
92b21e0ad3
1 changed files with 18 additions and 0 deletions
18
README.md
Normal file
18
README.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Debilus
|
||||||
|
|
||||||
|
Easy to setup typed relational Wrapper atop deno KV.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import { EntryFor, Schema, Store } from "https://git.barnulf.net/mb/debilus/raw/commit/fc701bec680dd73be29c72164f47ee87fac540c7/mod.ts"
|
||||||
|
const store = await Store.open(
|
||||||
|
new Schema({
|
||||||
|
user: { name: "string" },
|
||||||
|
post: { author: ["one", "user"] }
|
||||||
|
}),
|
||||||
|
"./store.kv"
|
||||||
|
);
|
||||||
|
type User = EntryFor<typeof store, "user">;
|
||||||
|
const bob: User = await store.insert("user", { name: "bob" });
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue