I have a few ways to iterate through a SQLite data set (d is the
database handle of my simple example):
One:
{ s.step = SQLITE.row }.while_do {
( s.as_string 0 + " " + s.as_string 1 + "\n").print;
};
s.finalize;
Two:
s := d.prepare("SELECT * FROM names");
s.foreach {
( s.as_string 0 + " " + s.as_string 1 + "\n").print;
};
s.finalize;
Three:
d.foreach ("SELECT * FROM names", { s:SQLITE_STATEMENT;
( s.as_string 0 + " " + s.as_string 1 + "\n").print;
});
Now, my question is about #3. I was thinking I would be able to format
that such as:
d.foreach "SELECT * FROM names" { s:SQLITE_STATEMENT;
// code
};
Any thoughts? Also, I am going to make SQLITE_ROW to contain all the
information, so the d.foreach
would give a type: row:SQLITE_ROW; row.as_string 0,
row.column_count, etc...
Jeremy
_______________________________________________
Isaac-devel mailing list
[email protected]
https://mail.gna.org/listinfo/isaac-devel