Crate diesel_oci

source ·
Expand description

The Oracle Diesel Backend

This crate only implements an oracle backend and connection for Diesel. To use diesel features, you must import it.

// Import diesel
use diesel::prelude::*;
// Import the oracle connection type
use diesel_oci::OciConnection;

table! {
   users {
       id -> Integer,
       name -> Text,
   }
}

// establish a connection
let mut conn = OciConnection::establish("oracle://user:secret@127.0.0.1/MY_DB")?;

// use the connection similary to any other diesel connection
let res = users::table.load::<(i32, String)>(&mut conn)?;

Feature flags

  • chrono Enables support for the chrono crate
  • r2d2 Enables support for r2d2 connection pooling
  • dynamic-schema Enables support for diesel-dynamic-schema

Modules

  • Provides types and functions related to working with Oracle
  • Oracle specific query builder implementation

Structs

  • Connections for the Oracle backend. The following connection url schema is supported:
  • Oracle specfic metadata about the type of a bind value
  • The Oracle backend type
  • A unserialized value as received from the database

Enums