Crate diesel_oci

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§

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

Structs§

OciConnection
Connections for the Oracle backend. The following connection url schema is supported:
OciIntervalDS
Oracle Interval with day, hour, minute, second, and subsecond information, the specifics of how long e.g. a day is depends on the start and end date of the interval and is handled by Oracle internally
OciIntervalYM
Oracle Interval with year and month information, the specifics of how many days are in a year or in a month is dependent on the start and end date of the interval and is handled by Oracle internally
OciTypeMetadata
Oracle specfic metadata about the type of a bind value
Oracle
The Oracle backend type
OracleValue
A unserialized value as received from the database
SqlIntervalDS
Sql type that represent the Oracle INTERVALDS type, to be used with things like the !table macro
SqlIntervalYM
Sql type that represent the Oracle IntervalYM type, to be used with things like the !table macro

Enums§

OciDataType
A list of database side datatypes