sqlite3 :: StatementIterator :: is_ok=
sqlite3 :: StatementIterator :: item=
sqlite3 :: StatementIterator :: statement=
Statement linked toself
sqlite3 $ StatementIterator :: SELF
Type of this instance, automatically specialized in every classsqlite3 $ StatementIterator :: init
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Iterator :: defaultinit
core :: Object :: defaultinit
sqlite3 :: StatementIterator :: is_ok=
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
sqlite3 :: StatementIterator :: item=
Iterator
whose elements are sorted by the function
core :: Object :: output_class_name
Display class name on stdout (debug only).sqlite3 :: StatementIterator :: statement=
Statement linked toself
# Iterator over the rows of a statement result
class StatementIterator
super Iterator[StatementRow]
# Statement linked to `self`
var statement: Statement
init
do
self.item = new StatementRow(statement)
self.is_ok = statement.native_statement.step.is_row
end
redef var item: StatementRow is noinit
redef var is_ok is noinit
# require: `self.statement.is_open`
redef fun next
do
assert statement_closed: statement.is_open
var err = statement.native_statement.step
if err.is_row then
is_ok = true
else if err.is_done then
# Clean complete
is_ok = false
else
# error
# FIXME do something with the error?
is_ok = false
end
end
redef fun finish do if statement.close_with_iterator then statement.close
end
lib/sqlite3/sqlite3.nit:276,1--312,3