pub enum Statement {
Show 22 variants
Query {
text: String,
inputs: Vec<HostVar>,
into: Vec<HostVar>,
},
Change {
kind: ChangeKind,
text: String,
inputs: Vec<HostVar>,
current_of: Option<String>,
},
DeclareCursor(Cursor),
DeclareUnsupported {
name: String,
what: String,
},
Open {
cursor: String,
declared: Option<Cursor>,
using: Vec<HostVar>,
descriptor: Option<HostVar>,
},
Fetch {
cursor: String,
into: Vec<HostVar>,
},
FetchDescriptor {
cursor: String,
descriptor: HostVar,
},
FetchRowset {
cursor: String,
rows: Rows,
into: Vec<HostVar>,
enabled: bool,
},
Close {
cursor: String,
},
InsertRows {
text: String,
inputs: Vec<HostVar>,
rows: Rows,
atomic: bool,
},
Call {
procedure: String,
text: String,
args: Vec<HostVar>,
},
Commit,
Rollback,
Prepare {
name: String,
source: HostVar,
into: Option<(HostVar, Names)>,
},
ExecuteImmediate {
source: HostVar,
},
Execute {
name: String,
inputs: Vec<HostVar>,
descriptor: Option<HostVar>,
},
Describe {
name: String,
descriptor: HostVar,
names: Names,
},
Whenever {
condition: Condition,
action: Action,
},
Declaration,
Connect {
what: String,
target: Option<HostVar>,
},
Unsupported(String),
Malformed(String),
}Variants§
Query
SELECT … INTO, VALUES … INTO, and SET :host-variable = expression.
Change
INSERT, UPDATE and DELETE; current_of names the cursor of a positioned UPDATE or DELETE.
DeclareCursor(Cursor)
DeclareUnsupported
A cursor ironwork does not run, such as a scrollable one, and what it is.
Open
declared is the cursor’s DECLARE, which Cursors::resolve fills; using the host
variables OPEN … USING sends to a prepared statement’s parameter markers, or descriptor
the SQLDA OPEN … USING DESCRIPTOR names.
Fetch
FetchDescriptor
FetchRowset
FETCH NEXT ROWSET into host-variable arrays; enabled is whether the cursor’s DECLARE
allows rowsets, which Cursors::resolve fills.
Close
InsertRows
INSERT … FOR n ROWS: text and inputs are the INSERT of one row, which runs for each.
Call
CALL of a stored procedure: text names it with ? for each host-variable argument.
Commit
Rollback
Prepare
PREPARE: the statement name, the host variable holding the statement string, and the SQLDA PREPARE … INTO describes the statement in.
ExecuteImmediate
Execute
EXECUTE of a prepared statement, with the host variables USING sends or the SQLDA USING DESCRIPTOR names.
Describe
DESCRIBE [OUTPUT] of a prepared statement into an SQLDA.
Whenever
Declaration
INCLUDE, DECLARE SECTION, DECLARE TABLE and DECLARE STATEMENT, which declare and do nothing.
Connect
CONNECT and SET CONNECTION, which ironwork does not run: what names the statement, and
target is the host variable naming the location, where one does.
Unsupported(String)
A statement ironwork does not run, named by what it is.
Malformed(String)
A statement the precompiler refuses, with the reason: it does not read as its verb requires, or it is not Db2 for z/OS.