asynchronous and synchronous interfaces and persistence implementations for your OOD architecture

Overview

OOD Persistence

Crates.io Documentation unsafe forbidden

Asynchronous and synchronous interfaces and persistence implementations for your OOD architecture

Installation

Add ood_persistence = { version = "0", features = ["<IMPLEMENTATION_NAME>"] } as a dependency in Cargo.toml.

NOTE: change <IMPLEMENTATION_NAME> to feature name from available list. See Cargo.toml for more information.

Cargo.toml example:

[package]
name = "my-crate"
version = "0.1.0"
authors = ["Me <[email protected]>"]

[dependencies]
ood_persistence = { version = "0", features = ["bb8_postgres"] }

In stable rust channel you can use only connection interface, but if you use nightly channel, add an additional "nightly" feature to your Cargo.toml and you can use transactions as well.

Usage

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // create pool to our database
    let pool = create_postgres_pool();
    // initialize persistence
    let persistence = ood_persistence::r2d2_postgres::new(&pool);
    // get connection to database
    let mut conn = persistence.get_connection()?;
    // we can query something
    let res: i32 = conn.inner().query_one("select 1", &[])?.get(0);
    assert_eq!(res, 1);

    Ok(())
}

See examples directory for more information.

Contributors

pleshevskiy (Dmitriy Pleshevskiy) – creator, maintainer.

You might also like...
Provides a Rust-based SQLite extension for using Hypercore as the VFS for your databases.

SQLite and Hypercore A Rust library providing SQLite with an virtual file system to enable Hypercore as a means of storage. Contributing The primary r

Visualize your database schema

dbviz Visualize your database schema. The tool loads database schema and draws it as a graph. Usage $ dbviz -d database_name | dot -Tpng schema.png

Macros that allow for implicit await in your async code.

suspend fn Disclaimer: this was mostly made as a proof of concept for the proposal below. I haven't tested if there is a performance cost to this macr

SubZero - a standalone web server that turns your database directly into a REST/GraphQL api

What is this? This is a demo repository for the new subzero codebase implemented in Rust. subZero is a standalone web server that turns your database

Replibyte - a powerful tool to seed your databases
Replibyte - a powerful tool to seed your databases

Seed Your Development Database With Real Data ⚡️ Replibyte is a powerful tool to seed your databases with real data and other cool features 🔥 Feature

Generate type-checked Rust from your PostgreSQL.
Generate type-checked Rust from your PostgreSQL.

Cornucopia Generate type checked Rust from your SQL Install | Example Cornucopia is a small CLI utility resting on postgres designed to facilitate Pos

Seed your development database with real data ⚡️
Seed your development database with real data ⚡️

Seed Your Development Database With Real Data ⚡️ Replibyte is a blazingly fast tool to seed your databases with your production data while keeping sen

Teach your PostgreSQL database how to speak MongoDB Wire Protocol
Teach your PostgreSQL database how to speak MongoDB Wire Protocol

“If it looks like MongoDB, swims like MongoDB, and quacks like MongoDB, then it probably is PostgreSQL.” 🙃 Discord | Online Demo | Intro Video | Quic

Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL
Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL

Skybase The next-generation NoSQL database What is Skybase? Skybase (or SkybaseDB/SDB) is an effort to provide the best of key/value stores, document

Releases(v0.3.1)
Owner
Dmitriy Pleshevskiy
man, programmer and cook
Dmitriy Pleshevskiy
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Datafuse Labs 5k Jan 9, 2023
A simple tomasulo simulator written in Rust for the course Computer Architecture.

Tomasulo Simulator This is a Tomasulo simulator written in Rust for the course Computer Architecture. Two Demo programs are tested in the simulator, w

GZTime 5 Dec 28, 2022
Ratchet is a fast, robust, lightweight and fully asynchronous implementation of RFC6455 (The WebSocket protocol).

Ratchet ?? Ratchet is a fast, robust, lightweight and fully asynchronous implementation of RFC6455 (The WebSocket protocol). Complete with an optional

SwimOS 7 Dec 16, 2022
Awesome books, tutorials, courses, and resources for the Tokio asynchronous runtime ecosystem. ⚡

Awesome Tokio Tokio is an asynchronous runtime for the Rust programming language. It provides the building blocks needed for writing network applicati

Marcus Cvjeticanin 59 Oct 27, 2023
influxdb provides an asynchronous Rust interface to an InfluxDB database.

influxdb influxdb provides an asynchronous Rust interface to an InfluxDB database. This crate supports insertion of strings already in the InfluxDB Li

null 9 Feb 16, 2021
Asynchronous handle for rusqlite library.

tokio-rusqlite Asynchronous handle for rusqlite library. Usage use rusqlite::{params, Result}; use tokio_rusqlite::Connection; #[derive(Debug)] struc

Eray Karatay 22 Dec 22, 2022
⚡🦀 🧨 make your rust types fit DynamoDB and visa versa

?? ?? dynomite dynomite makes DynamoDB fit your types (and visa versa) Overview Goals ⚡ make writing dynamodb applications in rust a productive experi

Doug Tangren 197 Dec 15, 2022
Grsql is a great tool to allow you set up your remote sqlite database as service and CRUD(create/read/update/delete) it using gRPC.

Grsql is a great tool to allow you set up your remote sqlite database as service and CRUD (create/ read/ update/ delete) it using gRPC. Why Create Thi

Bruce Yuan 33 Dec 16, 2022
Document your SQLite tables and columns with in-line comments

sqlite-docs A SQLite extension, CLI, and library for documentating SQLite tables, columns, and extensions. Warning sqlite-docs is still young and not

Alex Garcia 20 Jul 2, 2023
Query is a Rust server for your remote SQLite databases and a CLI to manage them.

Query Query is a Rust server for your remote SQLite databases and a CLI to manage them. Table Of Contents Run A Query Server CLI Install Use The Insta

Víctor García 6 Oct 6, 2023