diesel-rs / R2d2 Diesel
Licence: mit
Stars: ✭ 96
Programming Languages
rust
11053 projects
Labels
Projects that are alternatives of or similar to R2d2 Diesel
Docker Superset
Repository for Docker Image of Apache-Superset. [Docker Image: https://hub.docker.com/r/abhioncbr/docker-superset]
Stars: ✭ 86 (-10.42%)
Mutual labels: sql
Cutehmi
CuteHMI is an open-source HMI (Human Machine Interface) software written in C++ and QML, using Qt libraries as a framework. GitHub repository is a mirror!
Stars: ✭ 90 (-6.25%)
Mutual labels: sql
Firebirdwebadmin
FirebirdWebAdmin is a web frontend for the Firebird SQL database server written in PHP.
Stars: ✭ 92 (-4.17%)
Mutual labels: sql
Us Cities Database
🇺🇸 SQL dump of U.S. cities data containing latitude and longitude
Stars: ✭ 89 (-7.29%)
Mutual labels: sql
Jplusone
Tool for automatic detection and asserting "N+1 SELECT problem" occurences in JPA based Spring Boot Java applications and finding origin of JPA issued SQL statements in general
Stars: ✭ 91 (-5.21%)
Mutual labels: sql
Jsql
jSQL is the "official" Javascript Query Language - A database written in Javascript for use in a browser or Node.
Stars: ✭ 85 (-11.46%)
Mutual labels: sql
Toydb
Distributed SQL database in Rust, written as a learning project
Stars: ✭ 1,329 (+1284.38%)
Mutual labels: sql
Cloudquery
cloudquery transforms your cloud infrastructure into SQL or Graph database for easy monitoring, governance and security.
Stars: ✭ 1,300 (+1254.17%)
Mutual labels: sql
Electrocrud
Database CRUD Application Built on Electron | MySQL, Postgres, SQLite
Stars: ✭ 1,267 (+1219.79%)
Mutual labels: sql
Qtl
A friendly and lightweight C++ database library for MySQL, PostgreSQL, SQLite and ODBC.
Stars: ✭ 92 (-4.17%)
Mutual labels: sql
Training Material
A collection of code examples as well as presentations for training purposes
Stars: ✭ 85 (-11.46%)
Mutual labels: sql
r2d2
MODULE IN DIESEL INSTEAD
THIS CRATE HAS BEEN DEPRECATED, USE THE r2d2-diesel
Provides r2d2 support to allow connection pooling with Diesel.
Examples
The examples creates a connection pool with default settings for a PostgreSQL or SQLite database running on localhost, then creates a bunch of threads and acquires a connection from the pool for each thread.
Executable versions are in examples/ which you can run with
cargo run --example postgres --features "diesel/postgres"
or
cargo run --example sqlite --features "diesel/sqlite"
.
extern crate diesel;
extern crate r2d2;
extern crate r2d2_diesel;
use std::thread;
use diesel::PgConnection;
use r2d2_diesel::ConnectionManager;
fn main() {
let manager = ConnectionManager::<PgConnection>::new("postgres://localhost/");
let pool = r2d2::Pool::builder().build(manager).expect("Failed to create pool.");
for _ in 0..10i32 {
let pool = pool.clone();
thread::spawn(move || {
let connection = pool.get();
assert!(connection.is_ok());
});
}
}
Using diesel master branch
If you want to use diesel master's branch with r2d2-diesel you have to add the following section in your Cargo.toml file. If you're using a workspace, this needs to be in the Cargo.toml at the root of the workspace.
[patch.crates-io]
diesel = { git = "https://github.com/diesel-rs/diesel.git" }
diesel_infer_schema = { git = "https://github.com/diesel-rs/diesel.git" }
diesel_codegen = { git = "https://github.com/diesel-rs/diesel.git" }
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].