pub enum Statement {
Show 17 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>,
},
Fetch {
cursor: String,
into: Vec<HostVar>,
},
Close {
cursor: String,
},
Commit,
Rollback,
Prepare {
name: String,
source: HostVar,
},
ExecuteImmediate {
source: HostVar,
},
Execute {
name: String,
inputs: Vec<HostVar>,
},
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.
Fetch
Close
Commit
Rollback
Prepare
PREPARE: the statement name and the host variable holding the statement string.
ExecuteImmediate
Execute
EXECUTE of a prepared statement, with the host variables USING sends.
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.