Skip to main content

SqlStatement

Enum SqlStatement 

Source
pub enum SqlStatement<P = u32, S = u32> {
Show 22 variants Query { inputs: Vec<HostPlace<P>>, into: Vec<HostPlace<P>>, }, Change { delete: bool, inputs: Vec<HostPlace<P>>, current_of: Option<S>, }, Open { cursor: S, inputs: Vec<HostPlace<P>>, }, Fetch { cursor: S, into: Vec<HostPlace<P>>, }, Close { cursor: S, }, Commit, Rollback, Prepare { name: S, source: Vec<HostPlace<P>>, }, ExecuteImmediate { source: Vec<HostPlace<P>>, }, Execute { name: S, inputs: Vec<HostPlace<P>>, }, OpenPrepared { cursor: S, statement: S, inputs: Vec<HostPlace<P>>, }, Describe { name: S, descriptor: P, names: SqlNames, }, PrepareInto { name: S, source: Vec<HostPlace<P>>, descriptor: P, names: SqlNames, }, ExecuteDescriptor { name: S, descriptor: P, }, OpenDescriptor { cursor: S, statement: S, descriptor: P, }, FetchDescriptor { cursor: S, descriptor: P, }, FetchRowset { cursor: S, rows: RowCount<P>, into: Vec<HostArray<P>>, enabled: bool, }, InsertRows { inputs: Vec<HostArray<P>>, rows: RowCount<P>, atomic: bool, }, Call { procedure: S, args: Vec<HostPlace<P>>, }, Declaration, Unsupported(S), Connect { what: S, location: Vec<HostPlace<P>>, },
}
Expand description

The typed statement with its host variables resolved and each OPEN given its DECLARE’s inputs.

Variants§

§

Query

Fields

§inputs: Vec<HostPlace<P>>
§into: Vec<HostPlace<P>>
§

Change

Fields

§delete: bool
§inputs: Vec<HostPlace<P>>
§current_of: Option<S>
§

Open

Fields

§cursor: S
§inputs: Vec<HostPlace<P>>
§

Fetch

Fields

§cursor: S
§into: Vec<HostPlace<P>>
§

Close

Fields

§cursor: S
§

Commit

§

Rollback

§

Prepare

PREPARE of the statement name from the statement string in source, which must be one varying-length character or graphic string.

Fields

§name: S
§source: Vec<HostPlace<P>>
§

ExecuteImmediate

Fields

§source: Vec<HostPlace<P>>
§

Execute

EXECUTE of a prepared statement, inputs replacing its parameter markers.

Fields

§name: S
§inputs: Vec<HostPlace<P>>
§

OpenPrepared

OPEN of a cursor declared for the prepared statement statement.

Fields

§cursor: S
§statement: S
§inputs: Vec<HostPlace<P>>
§

Describe

DESCRIBE [OUTPUT] of a prepared statement into the SQLDA at descriptor.

Fields

§name: S
§descriptor: P
§names: SqlNames
§

PrepareInto

PREPARE … INTO: PREPARE, then DESCRIBE of the statement it made.

Fields

§name: S
§source: Vec<HostPlace<P>>
§descriptor: P
§names: SqlNames
§

ExecuteDescriptor

Fields

§name: S
§descriptor: P
§

OpenDescriptor

Fields

§cursor: S
§statement: S
§descriptor: P
§

FetchDescriptor

Fields

§cursor: S
§descriptor: P
§

FetchRowset

FETCH NEXT ROWSET into host-variable arrays; enabled is the cursor’s WITH ROWSET POSITIONING.

Fields

§cursor: S
§rows: RowCount<P>
§into: Vec<HostArray<P>>
§enabled: bool
§

InsertRows

INSERT … FOR n ROWS, the entry’s text the INSERT of one row. ATOMIC undoes every row when one fails.

Fields

§inputs: Vec<HostArray<P>>
§rows: RowCount<P>
§atomic: bool
§

Call

CALL of procedure: each host-variable argument is sent, and assigned what the procedure returns for it.

Fields

§procedure: S
§args: Vec<HostPlace<P>>
§

Declaration

WHENEVER, DECLARE CURSOR, INCLUDE and the other declarations: no op.

§

Unsupported(S)

Abends EXEC, naming it, when reached.

§

Connect

CONNECT or SET CONNECTION: the host variable naming the location, if any, goes to the input trace, then the statement abends EXEC as an unsupported one does.

Fields

§what: S
§location: Vec<HostPlace<P>>

Trait Implementations§

Source§

impl<P, S> Clone for SqlStatement<P, S>
where P: Clone, S: Clone,

Source§

fn clone(&self) -> SqlStatement<P, S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P, S> Debug for SqlStatement<P, S>
where P: Debug, S: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Decode for SqlStatement

Source§

impl Encode for SqlStatement

Source§

fn encode(&self, w: &mut Writer)

Source§

impl<P, S> Eq for SqlStatement<P, S>
where P: Eq, S: Eq,

Source§

impl<P, S> PartialEq for SqlStatement<P, S>
where P: PartialEq, S: PartialEq,

Source§

fn eq(&self, other: &SqlStatement<P, S>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<P, S> StructuralPartialEq for SqlStatement<P, S>
where P: PartialEq, S: PartialEq,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.