12 releases

Uses old Rust 2015

0.6.0 Mar 1, 2021
0.5.0 Dec 18, 2019
0.4.2 Nov 10, 2019
0.4.1 Mar 13, 2018
0.4.0 Sep 1, 2017

#24 in #odbc

Download history 262/week @ 2024-07-20 263/week @ 2024-07-27 302/week @ 2024-08-03 218/week @ 2024-08-10 276/week @ 2024-08-17 220/week @ 2024-08-24 206/week @ 2024-08-31 220/week @ 2024-09-07 258/week @ 2024-09-14 273/week @ 2024-09-21 391/week @ 2024-09-28 202/week @ 2024-10-05 200/week @ 2024-10-12 153/week @ 2024-10-19 164/week @ 2024-10-26 162/week @ 2024-11-02

694 downloads per month
Used in 8 crates (3 directly)

MIT license

77KB
1.5K SLoC

Odbc-safe

Build Status Docs MIT licensed

Note: This crate is no longer maintained. Try using odbc-api.

Introduction

This Rust crate builds upon the FFI (Foreign Function Interface) bindings for ODBC (Open Database Connectivity) provided by odbc-sys. It enables you to write ODBC Applications entirely in safe Rust. While this crate tries to prevent all kinds of erros it does very little to hide the complexity of ODBC, as it tries to be the smallest safe layer around odbc-sys. Therfore code written with this library is likely to be safe, but unlikely to look like idiomatic Rust. For a library offering greater convinience have a look at odbc-rs.

Design Goals

  • Zero cost abstraction
  • Catch Invalid Handle Errors at compile time
  • Prevent bound buffers or columns from going out of scope
  • Catch Function Sequence Errors at compile time
  • Not to abstract away any power of the underlying API

Current State

This library currently supports:

  • Direct execution of queries
  • Prepared execution of queries
  • Binding parameters
  • Retrieving Result Sets (kind of slow via SQLGetData)

Currently unsupported:

  • Binding columns to Result Sets
  • Multi threading and asynchronous capabilities

Documentation

Thanks to the folks of docs.rs for building and hosting the documentation!

Contributing

Want to help out? Just create an issue, pull request or contact markus.klein@live.de.

Dependencies

~92KB