1DB.exec(3kaya) Kaya module reference DB.exec(3kaya)
2
3
4
6 DB::exec - Execute a query
7
9 DBResult exec( DBHandle<a> con, String query )
10
12 Execute a query with the given connection handle.
13
14
15 res = exec(conn,"SELECT id,name FROM People");
16 if (res.rows > 0) {
17 for row in res.table {
18 // row[0] = DBInt(id)
19 // row[1] = DBText(name)
20 }
21 }
22
23 Non-SELECT queries will generally not return any result rows.
24
26 Kaya standard library by Edwin Brady, Chris Morris and others
27 (kaya@kayalang.org). For further information see http://kayalang.org/
28
30 The Kaya standard library is free software; you can redistribute it
31 and/or modify it under the terms of the GNU Lesser General Public
32 License (version 2.1 or any later version) as published by the Free
33 Software Foundation.
34
36 DB.DBHandle (3kaya)
37 DB.DBResult (3kaya)
38 DB.DBValue (3kaya)
39 DB.incExec (3kaya)
40
41
42
43Kaya December 2010 DB.exec(3kaya)