[−][src]Struct ackorelic::nr_connection::NRConnection
Fields
conn: PgConnection
Methods
impl NRConnection
[src]
pub fn build_transaction(&self) -> TransactionBuilder
[src]
Trait Implementations
impl Connection for NRConnection
[src]
type Backend = Pg
The backend this type connects to
type TransactionManager = AnsiTransactionManager
fn establish(database_url: &str) -> ConnectionResult<NRConnection>
[src]
fn execute(&self, query: &str) -> QueryResult<usize>
[src]
fn query_by_index<T, U>(&self, source: T) -> QueryResult<Vec<U>> where
T: AsQuery,
T::Query: QueryFragment<Pg> + QueryId,
Pg: HasSqlType<T::SqlType>,
U: Queryable<T::SqlType, Pg>,
[src]
T: AsQuery,
T::Query: QueryFragment<Pg> + QueryId,
Pg: HasSqlType<T::SqlType>,
U: Queryable<T::SqlType, Pg>,
fn query_by_name<T, U>(&self, source: &T) -> QueryResult<Vec<U>> where
T: QueryFragment<Pg> + QueryId,
U: QueryableByName<Pg>,
[src]
T: QueryFragment<Pg> + QueryId,
U: QueryableByName<Pg>,
fn execute_returning_count<T>(&self, source: &T) -> QueryResult<usize> where
T: QueryFragment<Pg> + QueryId,
[src]
T: QueryFragment<Pg> + QueryId,
fn transaction_manager(&self) -> &Self::TransactionManager
[src]
fn transaction<T, E, F>(&self, f: F) -> Result<T, E> where
E: From<Error>,
F: FnOnce() -> Result<T, E>,
[src]
E: From<Error>,
F: FnOnce() -> Result<T, E>,
Executes the given function inside of a database transaction Read more
fn begin_test_transaction(&self) -> Result<(), Error>
[src]
Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction. Read more
fn test_transaction<T, E, F>(&self, f: F) -> T where
E: Debug,
F: FnOnce() -> Result<T, E>,
[src]
E: Debug,
F: FnOnce() -> Result<T, E>,
Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more
impl SimpleConnection for NRConnection
[src]
fn batch_execute(&self, query: &str) -> QueryResult<()>
[src]
Auto Trait Implementations
impl Unpin for NRConnection
impl Send for NRConnection
impl !Sync for NRConnection
impl UnwindSafe for NRConnection
impl !RefUnwindSafe for NRConnection
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
Convert self
to an expression for Diesel's query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel's query builder. Read more