feat!: surrealdb 2.0, remove CreateVersion::Single, fix OVERWRITE_DB

This commit is contained in:
Elijah McMorris 2024-09-18 20:05:37 -07:00
parent 6dcb9fd043
commit 4663a862a4
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
13 changed files with 328 additions and 245 deletions

View file

@ -20,23 +20,6 @@ async fn inti_db() -> Result<Surreal<Db>, Error> {
fn bench(c: &mut Criterion) {
let mut group = c.benchmark_group("Create DB Entities");
group.bench_function("Single Insert", |b| {
b.iter(|| {
let rt = Runtime::new().unwrap();
rt.block_on(async {
let db = inti_db().await.unwrap();
let reader = File_Format::new("json")
.reader("tests/data/bench.json")
.unwrap();
CreateVersion::Single
.run(Some(db.clone()), reader, None, 1000, 100)
.await
.unwrap();
})
})
});
group.bench_function("Bulk Insert", |b| {
b.iter(|| {
let rt = Runtime::new().unwrap();