All Projects → elephantry → elephantry

elephantry / elephantry

Licence: MIT license
PostgreSQL OMM for rust

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to elephantry

phpPgAdmin6
PHP7+ Based administration tool for PostgreSQL 9.3+
Stars: ✭ 45 (+60.71%)
Mutual labels:  postgres
ash postgres
A postgresql datalayer for the Ash Framework
Stars: ✭ 21 (-25%)
Mutual labels:  postgres
pycroft
The new AG DSN management system
Stars: ✭ 16 (-42.86%)
Mutual labels:  postgres
migrant lib
Embeddable migration management
Stars: ✭ 22 (-21.43%)
Mutual labels:  postgres
gae-postgres
Connect to Cloud SQL for PostgreSQL from Google App Engine
Stars: ✭ 23 (-17.86%)
Mutual labels:  postgres
sqlx-adapter
Asynchronous casbin adapter for mysql, postgres, sqlite based on sqlx-rs
Stars: ✭ 27 (-3.57%)
Mutual labels:  postgres
clunk
Clojure Postgres w/out JDBC
Stars: ✭ 25 (-10.71%)
Mutual labels:  postgres
google-bigtable-postgres-fdw
Google Bigtable Postgres FDW in Rust
Stars: ✭ 37 (+32.14%)
Mutual labels:  postgres
flan
A tasty tool that lets you save, load and share postgres snapshots with ease
Stars: ✭ 177 (+532.14%)
Mutual labels:  postgres
integresql
IntegreSQL manages isolated PostgreSQL databases for your integration tests.
Stars: ✭ 475 (+1596.43%)
Mutual labels:  postgres
Odin-Securities
A master database of securities data for use with the Odin algorithmic trading platform.
Stars: ✭ 17 (-39.29%)
Mutual labels:  postgres
rocket-rest-api-with-jwt
A Rusty Rocket fuelled with Diesel and secured by JWT
Stars: ✭ 62 (+121.43%)
Mutual labels:  postgres
pg-ipc
IPC over PostgreSQL LISTEN/NOTIFY/UNLISTEN exposed as an EventEmitter
Stars: ✭ 27 (-3.57%)
Mutual labels:  postgres
pg global temp tables
Oracle-style global temporary tables for PostgreSQL
Stars: ✭ 16 (-42.86%)
Mutual labels:  postgres
ParseCareKit
Securely synchronize any CareKit 2.1+ based app to a Parse Server Cloud. Compatible with parse-hipaa.
Stars: ✭ 28 (+0%)
Mutual labels:  postgres
pgxmock
pgx mock driver for golang to test database interactions
Stars: ✭ 97 (+246.43%)
Mutual labels:  postgres
django-postgres-copy
Quickly import and export delimited data with Django support for PostgreSQL's COPY command
Stars: ✭ 151 (+439.29%)
Mutual labels:  postgres
Venflow
A brand new, fast and lightweight ORM, build for PostgreSQL.
Stars: ✭ 162 (+478.57%)
Mutual labels:  postgres
zenith
Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, branching, and bottomless storage.
Stars: ✭ 4,239 (+15039.29%)
Mutual labels:  postgres
pg-dba-egitim
Eğitim Konuları
Stars: ✭ 23 (-17.86%)
Mutual labels:  postgres

Elephantry

Crates.io docs.rs Github actions pipeline status

When Rust meets PostgreSQL.

Getting Started

See quickstart and examples.

Quick overview

Elephantry is an OMM (object model manager) dedicated to PostgreSQL design to handle from simple to complex queries.

let database_url = std::env::var("DATABASE_URL")
    .unwrap_or_else(|_| "postgres://localhost".to_string());

// Connect
let elephantry = elephantry::Pool::new(&database_url)?;

// Simple query
let rows = elephantry.execute("select id from entity")?;

for row in &rows {
    let id: i32 = row.get("id");
    println!("{id}");
}

// Define entity
#[derive(elephantry::Entity)]
#[elephantry(model = "Model", structure = "Structure")]
struct Entity {
    #[elephantry(pk)]
    id: u16,
    deleted: bool,
}

// Read entities
let entity = elephantry.find_by_pk::<Model>(&elephantry::pk!(id))?;
let entities = elephantry.find_all::<Model>(None)?;
let entities = elephantry.find_where::<Model>("deleted = $1", &[&false], None)?;

// Write entities
elephantry.insert_one::<Model>(&entity)?;
elephantry.update_one::<Model>(&elephantry::pk!{id => entity.id}, &entity)?;
elephantry.delete_one::<Model>(&entity)?;
elephantry.delete_where::<Model>("deleted = $1", &[&true])?;

Features

  • all-types — enables all type features (see below);
  • arbitrary — add support for arbitrary crate;
  • config — adds support for config layered configuration system;
  • pg14 — enables postgresql 14 features (multirange and new TargetSessionAttrs);
  • r2d2 — adds support for r2d2 generic connection pool;
  • rocket — adds support for rocket web framewok;
  • serde — adds support for de/serialization via serde.

Types

  • bit — adds support for bit type;
  • date — adds support for date type;
  • geo — adds support for geometric type;
  • json — adds support for json type;
  • multirange — adds support for multirange type (postgresql >= 14);
  • money — adds support for money type;
  • net — adds support for network type;
  • numeric — adds support for numeric type;
  • time — adds support for time type;
  • uuid — adds support for uuid type;
  • xml — adds support for xml type.

Projects using Elephantry

  • todo — Todo rocket example app;
  • explain — A CLI tool transforms postgresql explain to a graph;
  • sav — A simple CRUD application to archive bought item waranty build with rocket;
  • out of gafam — Generate RSS feed for GAFAM (youtube, facebook, instagram and twitter) using actix.
  • captainstat — Another simple application builds with actix to display statitics;
  • oxfeed — A feed reader with an actix API and yew front.

If you want to add your project here, please create a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].