ODBC wrapper for safe idiomatic Rust

Overview

ODBC wrapper for safe idiomatic Rust

Library for writing ODBC applications in Rust.

If you're looking for raw ODBC FFI bindings check odbc-safe and odbc-sys crate.

Project Status: Unsupported – The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired.

https://travis-ci.org/Koka/odbc-rs Build status https://crates.io/crates/odbc Coverage Status Docs Join the chat at https://gitter.im/odbc-rs/odbc

Docs are also available here

println!("Error: {}", diag), } } fn connect() -> std::result::Result<(), DiagnosticRecord> { let env = create_environment_v3().map_err(|e| e.unwrap())?; let mut buffer = String::new(); println!("Please enter connection string: "); io::stdin().read_line(&mut buffer).unwrap(); let conn = env.connect_with_connection_string(&buffer)?; execute_statement(&conn) } fn execute_statement<'env>(conn: &Connection<'env, AutocommitOn>) -> Result<()> { let stmt = Statement::with_parent(conn)?; let mut sql_text = String::new(); println!("Please enter SQL statement string: "); io::stdin().read_line(&mut sql_text).unwrap(); match stmt.exec_direct(&sql_text)? { Data(mut stmt) => { let cols = stmt.num_result_cols()?; while let Some(mut cursor) = stmt.fetch()? { for i in 1..(cols + 1) { match cursor.get_data::<&str>(i as u16)? { Some(val) => print!(" {}", val), None => print!(" NULL"), } } println!(""); } } NoData(_) => println!("Query executed, no data returned"), } Ok(()) } ">
extern crate odbc;
// Use this crate and set environmet variable RUST_LOG=odbc to see ODBC warnings
extern crate env_logger;
use odbc::*;
use std::io;
use odbc_safe::AutocommitOn;

fn main() {

    env_logger::init();

    match connect() {
        Ok(()) => println!("Success"),
        Err(diag) => println!("Error: {}", diag),
    }
}

fn connect() -> std::result::Result<(), DiagnosticRecord> {

    let env = create_environment_v3().map_err(|e| e.unwrap())?;

    let mut buffer = String::new();
    println!("Please enter connection string: ");
    io::stdin().read_line(&mut buffer).unwrap();

    let conn = env.connect_with_connection_string(&buffer)?;
    execute_statement(&conn)
}

fn execute_statement<'env>(conn: &Connection<'env, AutocommitOn>) -> Result<()> {
    let stmt = Statement::with_parent(conn)?;

    let mut sql_text = String::new();
    println!("Please enter SQL statement string: ");
    io::stdin().read_line(&mut sql_text).unwrap();

    match stmt.exec_direct(&sql_text)? {
        Data(mut stmt) => {
            let cols = stmt.num_result_cols()?;
            while let Some(mut cursor) = stmt.fetch()? {
                for i in 1..(cols + 1) {
                    match cursor.get_data::<&str>(i as u16)? {
                        Some(val) => print!(" {}", val),
                        None => print!(" NULL"),
                    }
                }
                println!("");
            }
        }
        NoData(_) => println!("Query executed, no data returned"),
    }

    Ok(())
}
Comments
  • simpler api

    simpler api

    The postgres crate has a pretty simple API https://github.com/sfackler/rust-postgres/blob/master/README.md. It would be nice to have the same with odbc-rs.

    enhancement 
    opened by bbigras 13
  • Connection Pooling support

    Connection Pooling support

    I tried to use r2d2 package and r2d2_odbc but there is a collision in carate usage with the same name. How to enable connection pooling? Does this driver support connection pooling?

    The code I tried: extern crate odbc_safe; // Use this crate and set environment variable RUST_LOG=odbc to see ODBC warnings extern crate env_logger; extern crate odbc;

    use odbc_safe::AutocommitOn; use std::{thread, io};

    use std::time::{SystemTime}; use std::sync::{Arc, Mutex}; use std::collections::HashMap;

    use odbc::*; use odbc::ResultSetState::Data; use odbc_safe::Statement; use odbc::DiagnosticRecord;

    fn main() {

    env_logger::init();
    
    match connect() {
        Ok(()) => println!("Success"),
        Err(diag) => println!("Error: {}", diag),
    }
    

    } fn connect() -> std::result::Result<(), DiagnosticRecord> {

    let mut buffer = String::new();
    println!("Please enter connection string: ");
    io::stdin().read_line(&mut buffer).unwrap();
    let manager = ODBCConnectionManager::new(&buffer);
    
    let pool = r2d2::Pool::builder()
        .max_size(32)
        .build(manager)
        .unwrap();
    let pool_conn = pool.get().unwrap();
    
    let conn = pool_conn.raw() as Connection<AutocommitOn>;
    execute_statement(&conn)
    

    }

    fn execute_statement(conn: &Connection) -> Result<()> { let stmt = Statement::with_parent(conn)?;

    let mut sql_text = String::new();
    println!("Please enter SQL statement string: ");
    io::stdin().read_line(&mut sql_text).unwrap();
    
    match stmt.exec_direct(&sql_text)? {
        Data(mut stmt) => {
            let cols = stmt.num_result_cols()?;
            while let Some(mut cursor) = stmt.fetch()? {
                for i in 1..(cols + 1) {
                    match cursor.get_data::<&str>(i as u16)? {
                        Some(val) => print!(" {}", val),
                        None => print!(" NULL"),
                    }
                }
                println!();
            }
        }
        NoData(_) => println!("Query executed, no data returned"),
    }
    
    Ok(())
    

    }

    question 
    opened by AWADHAMBIKA 10
  • How can I connect to MS DataBase

    How can I connect to MS DataBase

    I'm connected to MS Access database using julia odbc as below:

    db=ODBC.DSN("Driver={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=C:/Users/hasan.yousef/Documents/myDB.accdb")
    

    I'm using evcxr_jupyter

    How can I do the same using Rust.

    image

    question 
    opened by hyousefGopher 8
  • In some editions of Windows using non UTF-8, displaying DiagnosticRecord causes thread 'main' panicked at 'called `Result::unwrap()` on Utf8Error

    In some editions of Windows using non UTF-8, displaying DiagnosticRecord causes thread 'main' panicked at 'called `Result::unwrap()` on Utf8Error

    I'm using a Japanese edition of Windows and MSSQL. When I call env.connect_with_connection_string with an incorrect connection string, the function does not return an Err, but causes following panick with Utf8Error.

    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 33, error_len: Some(1) }', libcore\result.rs:1009:5
    stack backtrace:
    ...
      12: odbc::diagnostics::{{impl}}::fmt
                 at C:\Users\username\Project\rust\odbc_test\odbc-rs\src\diagnostics.rs:63
    ...
      21: env_logger::fmt::DefaultFormat::write_args
                 at C:\Users\username\.cargo\registry\src\github.com-1ecc6299db9ec823\env_logger-0.6.0\src\fmt\mod.rs:290
    ...
      28: log::__private_api_log
                 at C:\Users\username\.cargo\registry\src\github.com-1ecc6299db9ec823\log-0.4.6\src\lib.rs:1232
      29: odbc::result::into_result<odbc_safe::data_source::DataSource<odbc_safe::data_source::connected::Connected>,odbc_safe::data_source::DataSource<odbc_safe::data_source::unconnected::Unconnected>>
                 at C:\Users\username\Project\rust\odbc_test\odbc-rs\src\result.rs:95
      30: odbc::environment::Environment<odbc_safe::version::Odbc3>::connect_with_connection_string
                 at C:\Users\username\Project\rust\odbc_test\odbc-rs\src\connection.rs:40
    ...
      41: main
    ...
    error: process didn't exit successfully: `target\debug\odbc_test.exe` (exit code: 101)
    

    This is because the ODBC driver returns messages in Shift_JIS (strictly speaking, it is Windows-31J) encoding, which is incompatible with UTF-8. As an experiment, I have rewrited using encoding_rs 0.8.15 odbc-rs/src/diagnostics.rs:63 as follows.

    https://github.com/Koka/odbc-rs/blob/3e8d207826273d4f91e9b388123f853acd7ce504/src/diagnostics.rs#L63

                encoding_rs::SHIFT_JIS.decode(message.to_bytes()).0
    

    This rewriting passes connect_with_connection_string and the function returns Err correctly. The following message is the proper message in Shift_JIS, which causes Utf8Error panick above.

    [2019-02-07T11:25:39Z ERROR odbc::result] State: IM002, Native error: 0, Message: [Microsoft][ODBC Driver Manager] デー タ ソース名および指定された既定のドライバーが見つかりません。
    

    (FYI, this message says "The data source name and specified default driver is not found" in Japanese.)

    Of course this rewriting is just an experimental code and can never be accepted as production code. I'm new to Rust and ODBC, but I think it is better to create some mechanisms to provide some way for users to change the conversion from std::ffi::CStr to string.

    Note: This problem seems to be common in CJK editions of Windows.

    • Japanese editions of Windows use Microsoft Code Page 932 (Windows-31J, or called Shift_JIS inaccurately) by default
    • Simplified Chinese editions of Windows use Microsoft Code Page 936 (GBK) by default
    • Korean editions of Windows use Microsoft Code Page 949 (UCH) by default

    The default code page can surely be changed, but there are hardly any users change the setting, and even some CJK applications assume that the setting is not changed.

    This problem is similar to #94, #52, #86.

    bug 
    opened by xyx-is 8
  • Large columns support (SQL_NO_TOTAL)

    Large columns support (SQL_NO_TOTAL)

    https://github.com/Koka/odbc-rs/blob/master/src/statement/output.rs#L115

    It looks like this function doesn't expect the SQL_NO_TOTAL case (-4) and it goes badly.

    I don't know what SQL_NO_TOTAL means, but I can report that this happened when querying a column with large text values.

    work-in-progress feature-request 
    opened by jlgale 8
  • Panic when Reading table from DB2 Driver

    Panic when Reading table from DB2 Driver

    I'm hitting the following panic which I think relates to some DB2 related weirdness. I have a feeling it's returning no value for a column row.

    Happy to submit a PR if someone can point me in the direction of where it possibly might be an issue:

    thread 'tokio-runtime-worker-0' panicked at 'no more data but indicatior outside of data buffer', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/odbc-0.14.0/src/statement/output.rs:69:21
    

    This relates to the following line:

    https://github.com/Koka/odbc-rs/blob/97bdbe7555c86b975e902211d810c9b823017062/src/statement/output.rs#L69

    bug 
    opened by cetra3 6
  • get_data returns Chinese string error under windows

    get_data returns Chinese string error under windows

    The database returns a Chinese string. Running normally under linux, but compiling and running under windows will report the following error:

    thread 'main' panicked at 'called Result::unwrap()on anErr value: Utf8Error { valid_up_to: 1, error_len: Some(1) }'
    
    bug 
    opened by gmg137 6
  • iODBC Driver Manager support

    iODBC Driver Manager support

    I am trying to connect to a sqlite3 database to query a table. In my project, the connection string gives me the error 'Diagnostics returned error for record number 2. Record numbers have to be at least 1.'

    I decided to download the crate individually to see if I could run test examples and figure out what is wrong with my code. None of the tests pass.

    My output is below: cargo_test_output.txt

    Also, is there a list of dependencies need for this repo? I got a linker error until I used "brew install libiodbc".

    feature-request 
    opened by iotaaxel 6
  • odbc-safe layer

    odbc-safe layer

    I am open a GitHub issue since this is probably the best way to have a public design discussion. During the last month I have been busy revisiting some of the design decisions in odbc-rs and did some iterating in a separate repository without worrying to much about breaking interfaces and tests. I did this not with use cases in mind and convenience in mind, but wanted to stay very truthful to the original ODBC C interface. You can have a look at the result of this at odbc-safe. Referring our design discussion in issue #14 [odbc-safe] is currently a merge of layers 2 and 3.

    My suggestion is to rewrite odbc-rs in Terms of [odbc-safe]. This should allow us:

    • To write odbc-rs entirely in safe Rust. Making contributions less dangerous and easier to review.
    • Provide users with uses cases which are not supported yet (i.e. #48 ), or are add odds with the design decisions made in odbc-rs a layer to fall back on, which is still safe Rust.

    However, some breaking changes are likely to occur down this road. I've down little thinking on how exactly an idiomatic odbc library build on top of odbc-safe would look like, but I thought it is about time to discuss this with you and hear your general thoughts about the subject.

    opened by pacman82 6
  • [FreeTDS][SQL Server]Invalid string or buffer length

    [FreeTDS][SQL Server]Invalid string or buffer length

    The problem doesn't happen every time. I just tested 5 times and I got ok, ok, err, err, err, ok, ok. Also it seems to only happen when I use bind_parameter.

    error

    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: State: HY090, Native error: 0, Message: [FreeTDS][SQL Server]Invalid string or buffer length', /checkout/src/libcore/result.rs:860:4
    

    create table

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    SET ANSI_PADDING ON
    GO
    CREATE TABLE [dbo].[test](
    	[CODE] [int] NULL,
    	[VALUE] [varchar](15) NULL
    ) ON [PRIMARY]
    
    GO
    SET ANSI_PADDING OFF
    

    insert data

    INSERT INTO test
    (CODE, VALUE)
    VALUES (10605, 'a');
    

    query

    let stmt = stmt.prepare(r#"SELECT
    CODE
    FROM test
    WHERE
    CODE = ?;"#)?;
    
    let code = 10605;
    
    let stmt = stmt.bind_parameter(1, &code)?;
    

    versions rustc 1.21.0-nightly (ba1d065ff 2017-08-06) odbc 0.9 Driver=FreeTDS freetds 1.00.44-1 Arch Linux 64-bit Microsoft SQL Server Standard Edition (64-bit) 9.00.3042.00

    bug work-in-progress 
    opened by bbigras 6
  • [FreeTDS][SQL Server]Invalid data type

    [FreeTDS][SQL Server]Invalid data type

    error

    thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: State: HY004, Native error: 0, Message: [FreeTDS][SQL Server]Invalid data type', /checkout/src/libcore/result.rs:860
    

    code

    let param = "something";
    
    let mut stmt = stmt.prepare("SELECT col1, col2 FROM table WHERE p = ?")?;
    
    let stmt = stmt.bind_parameter(1, &param)?;
    

    rustc 1.19.0-nightly (cfb5debbc 2017-06-12) odbc b88e6837704aafbcfd23a7bdc8556a7b6f02a20e Driver=FreeTDS freetds 1.00.40-1 Arch Linux 64-bit

    bug work-in-progress 
    opened by bbigras 6
  • Update env_logger requirement from 0.7 to 0.9

    Update env_logger requirement from 0.7 to 0.9

    Updates the requirements on env_logger to permit the latest version.

    Release notes

    Sourced from env_logger's releases.

    v0.9.0

    Breaking Changes:

    • Default message format now prints the target instead of the module

    Improvements:

    • Added a method to print the module instead of the target
    Commits
    • 04856ac bump version to 0.9.0
    • e4744ff Merge pull request #209 from gtsiam/main
    • c5fa7a2 refactor: fix clippy warnings
    • 34574df Update link to examples
    • 1888497 Clarified documentation about log filtering
    • 365ffaf Show target instead of module path by default
    • d2998a6 Add option to print log target
    • 13cafce Bump version to 0.8.4
    • 0900811 Ensure unique directive names when building filters
    • 1a8379a Allow writing logs to a custom output target (Target::Pipe)
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • Update odbc-sys requirement from 0.8.2 to 0.18.4

    Update odbc-sys requirement from 0.8.2 to 0.18.4

    Updates the requirements on odbc-sys to permit the latest version.

    Changelog

    Sourced from odbc-sys's changelog.

    0.18.4

    • Check for overflow in len_data_at_exec.

    0.18.3

    • Improved documentation connection pooling.

    0.18.2

    • Add SQLParamData

    0.18.1

    • Add DATA_AT_EXEC
    • Add fn len_data_at_exec

    0.18.0

    • Type of NTS and NTSL is now isize.

    0.17.2

    • Introduce iodbc feature for linking against iodbc on OS-X.

    0.17.1

    • Fix: SqlReturn::INVALID_HANDLE is now correctly set to -2.

    0.17.0

    • Remove constants and types specific to Microsoft SQL Server.

      • SS_LENGTH_UNLIMITED
      • SsTime2
      • SsTimestampOffset
      • SS_VARIANT
      • SS_UDT
      • SS_XML
      • SS_TABLE
      • SS_TIME_2
      • SS_TIMESTAMP_OFFSET

    ... (truncated)

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 0
  • This repo is unsupported

    This repo is unsupported

    Hello folks, as of late I have no time to support and maintain this repo. I'll gladly add someone who has energy, desire and a good intent as a github collaborator and grant they with ability to publish to crates.io

    opened by Koka 1
  • Upgrade to GitHub-native Dependabot

    Upgrade to GitHub-native Dependabot

    Dependabot Preview will be shut down on August 3rd, 2021. In order to keep getting Dependabot updates, please merge this PR and migrate to GitHub-native Dependabot before then.

    Dependabot has been fully integrated into GitHub, so you no longer have to install and manage a separate app. This pull request migrates your configuration from Dependabot.com to a config file, using the new syntax. When merged, we'll swap out dependabot-preview (me) for a new dependabot app, and you'll be all set!

    With this change, you'll now use the Dependabot page in GitHub, rather than the Dependabot dashboard, to monitor your version updates, and you'll configure Dependabot through the new config file rather than a UI.

    If you've got any questions or feedback for us, please let us know by creating an issue in the dependabot/dependabot-core repository.

    Learn more about migrating to GitHub-native Dependabot

    Please note that regular @dependabot commands do not work on this pull request.

    dependencies 
    opened by dependabot-preview[bot] 1
  • Minor updates to the example in README

    Minor updates to the example in README

    The example in the README is fully functional as is, but there are some warnings, at least in the JetBrains Clion IDE. The changes in this PR fix all the warnings, plus a typo.

    opened by Vagelis-Prokopiou 0
Releases(0.17.0)
Owner
Konstantin V. Salikhov
Konstantin V. Salikhov
A safe, extensible ORM and Query Builder for Rust

A safe, extensible ORM and Query Builder for Rust API Documentation: latest release – master branch Homepage Diesel gets rid of the boilerplate for da

Diesel 9.7k Jan 3, 2023
Diesel - A safe, extensible ORM and Query Builder for Rust

A safe, extensible ORM and Query Builder for Rust API Documentation: latest release – master branch Homepage Diesel gets rid of the boilerplate for da

Takayuki Maeda 0 Aug 31, 2020
Lightweight async Redis client with connection pooling written in pure Rust and 100% memory safe

redi-rs (or redirs) redi-rs is a Lightweight Redis client with connection pooling written in Rust and 100% memory safe redi-rs is a Redis client writt

Oğuz Türkay 4 May 20, 2023
An LSM storage engine designed to significantly reduce I/O amplification written in safe rust (Under active development)

VelarixDB is an LSM-based storage engine designed to significantly reduce IO amplification, resulting in better performance and durability for storage

gifted_dl 14 Sep 25, 2024
rust wrapper for rocksdb

rust-rocksdb Requirements Clang and LLVM Contributing Feedback and pull requests welcome! If a particular feature of RocksDB is important to you, plea

null 1.3k Dec 30, 2022
UnQLite wrapper 1.0 is avaliable for Rust

unqlite A high-level UnQLite database engine wrapper. NOTE: Some of the documents is stolen from UnQLite Official Website. What is UnQLite? UnQLite is

Huo Linhe 101 Dec 12, 2022
An API Wrapper for https://paste.myst.rs written in rust

PasteMyst.RS pastemyst-rs is an api wrapper for pastemyst written in Rust. ⚠ This package is under development ⚠ Sample usage To get a paste from past

ANF Studios 14 Nov 28, 2021
duckdb-rs is an ergonomic wrapper for using duckdb from Rust.

duckdb-rs duckdb-rs is an ergonomic wrapper for using duckdb from Rust. It attempts to expose an interface similar to rusqlite. Acctually the initial

Wang Fenjin 126 Dec 30, 2022
Rusqlite is an ergonomic wrapper for using SQLite from Rust

Rusqlite Rusqlite is an ergonomic wrapper for using SQLite from Rust. It attempts to expose an interface similar to rust-postgres. use rusqlite::{para

Rusqlite 1.9k Jan 7, 2023
Type-safe SQL query wrappers

fnsql   The fnsql crate provides simple type-safe optional wrappers around SQL queries. Instead of calling type-less .query() and .execute(), you call

Dan Aloni 9 Apr 29, 2022
Thin wrapper around [`tokio::process`] to make it streamable

process-stream Wraps tokio::process::Command to future::stream. Install process-stream = "0.2.2" Example usage: From Vec<String> or Vec<&str> use proc

null 4 Jun 25, 2022
Postgres Foreign Data Wrapper for Clerk.com API

Pre-requisites Postgres-15 Rust pgrx Getting Started To run the program locally, clone the repository git clone https://github.com/tembo-io/clerk_fdw.

Tembo 3 Aug 22, 2023
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.

SQLx ?? The Rust SQL Toolkit Install | Usage | Docs Built with ❤️ by The LaunchBadge team SQLx is an async, pure Rust† SQL crate featuring compile-tim

launchbadge 7.6k Dec 31, 2022
Redis re-implemented in Rust.

rsedis Redis re-implemented in Rust. Why? To learn Rust. Use Cases rsedis does not rely on UNIX-specific features. Windows users can run it as a repla

Sebastian Waisbrot 1.6k Jan 6, 2023
A generic connection pool for Rust

r2d2 A generic connection pool for Rust. Documentation Opening a new database connection every time one is needed is both inefficient and can lead to

Steven Fackler 1.2k Jan 8, 2023
An ArangoDB driver for Rust

Rincon Rincon is an ArangoDB driver for Rust. It enables low level access to ArangoDB in a typesafe and Rust idiomatic manner. The name Rincon is deri

Innoave 35 Mar 21, 2021
Cassandra DB native client written in Rust language. Find 1.x versions on https://github.com/AlexPikalov/cdrs/tree/v.1.x Looking for an async version? - Check WIP https://github.com/AlexPikalov/cdrs-async

CDRS CDRS is looking for maintainers CDRS is Apache Cassandra driver written in pure Rust. ?? Looking for an async version? async-std https://github.c

Alex Pikalov 338 Jan 1, 2023
Cassandra (CQL) driver for Rust, using the DataStax C/C++ driver under the covers.

cassandra-cpp This is a maintained Rust project that exposes the DataStax cpp driver at https://github.com/datastax/cpp-driver/ in a somewhat-sane cra

null 93 Jan 7, 2023
CouchDB client-side library for the Rust programming language

Chill Chill is a client-side CouchDB library for the Rust programming language, available on crates.io. It targets Rust Stable. Chill's three chief de

null 35 Jun 26, 2022