init
Some checks failed
ci/woodpecker/push/test Pipeline failed

This commit is contained in:
JMARyA 2025-04-28 18:53:21 +02:00
commit 6c54873ca2
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
34 changed files with 5502 additions and 0 deletions

39
README.md Normal file
View file

@ -0,0 +1,39 @@
# 🦉 owl
owl provides a model based database with references and relations.
## Example
Simple embedded database:
```rust
use owl::prelude::*;
#[model]
#[derive(Debug)]
pub struct Item {
pub id: Id,
pub cost: f64,
pub strength: f64
}
pub fn main() {
// Init
let db = Database::in_memory();
// Save
let item = Item {
id: Id::new_ulid(),
cost: 1.20,
strength: 0.4,
};
dbg!(&item);
db.save(&item);
// Get
let i: Item = db.get(&item.id.to_string());
dbg!(i);
}
```
For more usage examples look at the `./examples` directory.