class sql::Statement
sys::Obj sql::Statement
Statement is an executable statement for a specific database. A statement may be executed immediately or prepared and executed later with parameters. See pod-doc.
- close
-
Void close()Close the statement.
- execute
-
Obj execute([Str:Obj]? params := null)Execute a SQL statement and if applicable return a result. If the statement produced auto-generated keys, then return an Int[] list of the keys generated, otherwise return number of rows modified.
- limit
-
Int? limitMaximum number of rows returned when this statement is executed. If limit is exceeded rows are silently dropped. A value of null indicates no limit.
- prepare
-
This prepare()Prepare this statement by compiling for efficient execution. Return this.
- query
-
Row[] query([Str:Obj]? params := null)Execute the statement and return the resulting
ListofRows. TheColsare available fromList.of.fieldsor ontype.fieldsof each row instance. - queryEach
-
Void queryEach([Str:Obj]? params, |Row| eachFunc)Execute the statement. For each row in the result, invoke the specified function
each. TheObjpassed to theeachfunction will be of typeRow. - sql
-
const Str sqlThe SQL text used to create this statement.