[][src]Struct sqlx::postgres::PgDatabaseError

pub struct PgDatabaseError(_);
This is supported on crate feature postgres only.

An error returned from the PostgreSQL database.

Implementations

impl PgDatabaseError[src]

pub fn severity(&self) -> PgSeverity[src]

pub fn code(&self) -> &str[src]

The SQLSTATE code for this error.

pub fn message(&self) -> &str[src]

The primary human-readable error message. This should be accurate but terse (typically one line).

pub fn detail(&self) -> Option<&str>[src]

An optional secondary error message carrying more detail about the problem. Might run to multiple lines.

pub fn hint(&self) -> Option<&str>[src]

An optional suggestion what to do about the problem. This is intended to differ from detail in that it offers advice (potentially inappropriate) rather than hard facts. Might run to multiple lines.

pub fn position(&self) -> Option<PgErrorPosition<'_>>[src]

Indicates an error cursor position as an index into the original query string; or, a position into an internally generated query.

pub fn where(&self) -> Option<&str>[src]

An indication of the context in which the error occurred. Presently this includes a call stack traceback of active procedural language functions and internally-generated queries. The trace is one entry per line, most recent first.

pub fn schema(&self) -> Option<&str>[src]

If this error is with a specific database object, the name of the schema containing that object, if any.

pub fn table(&self) -> Option<&str>[src]

If this error is with a specific table, the name of the table.

pub fn column(&self) -> Option<&str>[src]

If the error is with a specific table column, the name of the column.

pub fn data_type(&self) -> Option<&str>[src]

If the error is with a specific data type, the name of the data type.

pub fn constraint(&self) -> Option<&str>[src]

If the error is with a specific constraint, the name of the constraint. For this purpose, indexes are constraints, even if they weren't created with constraint syntax.

pub fn file(&self) -> Option<&str>[src]

The file name of the source-code location where this error was reported.

pub fn line(&self) -> Option<usize>[src]

The line number of the source-code location where this error was reported.

pub fn routine(&self) -> Option<&str>[src]

The name of the source-code routine reporting this error.

Trait Implementations

impl DatabaseError for PgDatabaseError[src]

impl Debug for PgDatabaseError[src]

impl Display for PgDatabaseError[src]

impl Error for PgDatabaseError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,