Adding apropos("keyword") method
[io/quag.git] / addons / DBI / samples / fetchobj.io
blobf5172c5f270591be1597b5ed4c5c8ddca7264868
1 doFile("dummydata.io")
3 c := DBI with("sqlite3")
4 c optionPut("dbname", "test.db")
5 c optionPut("sqlite3_dbdir", ".")
6 c connect
8 createDummyData(c)
10 r := c query("SELECT * FROM people")
11 r foreach(Person, p, // See Person.io for Person object definition
12 ("Fullname: " .. p fullName alignLeft(12)) print
13 ( "Dob: " .. p dob asString("%A, %B %d, %Y") alignLeft(30)) print
14 ( "Age: " .. p age) println
16 r done
18 dropDummyData(c)
20 c close