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

17
examples/blob.rs Normal file
View file

@ -0,0 +1,17 @@
use owl::{db::model::file::File, prelude::*, Identifiable};
pub fn main() {
// Init
let db = Database::in_memory();
let f = File::new(
include_bytes!("../Cargo.toml").to_vec(),
Some("Cargo.toml".to_string()),
&db,
);
dbg!(&f);
let f: Model<File> = db.get(f.id()).unwrap();
let data = String::from_utf8(f.read_file(&db)).unwrap();
println!("Content: {data}");
}