Commit 8d022f5322f89cf42680c50bdfcda07054dface8
1 parent
09d474fb
add db_get_list_String with clause and binds
Showing
1 changed file
with
23 additions
and
0 deletions
Show diff stats
controller/hk_sql_utils.anubis
| @@ -105,6 +105,29 @@ public define Int | @@ -105,6 +105,29 @@ public define Int | ||
| 105 | db_get_Int(db, clause, []) | 105 | db_get_Int(db, clause, []) |
| 106 | . | 106 | . |
| 107 | 107 | ||
| 108 | +public define List(String) | ||
| 109 | + db_get_List_String | ||
| 110 | + ( | ||
| 111 | + SQLite3DataBase db, | ||
| 112 | + String clause, | ||
| 113 | + List(SQLite3Bind) binds | ||
| 114 | + )= | ||
| 115 | + if sql_query_timeout(db, clause+";", binds, "db_get_List_String") is | ||
| 116 | + { | ||
| 117 | + error(sql_error) then println("db_get_List_String SQL ERROR '"+ sql_error.text + "'\n clause ["+clause+";]");[], | ||
| 118 | + ok(_, cursor, _) then db_get_List_String(cursor) | ||
| 119 | + } | ||
| 120 | +. | ||
| 121 | + | ||
| 122 | +public define List(String) | ||
| 123 | + db_get_List_String | ||
| 124 | + ( | ||
| 125 | + SQLite3DataBase db, | ||
| 126 | + String clause | ||
| 127 | + )= | ||
| 128 | + db_get_List_String(db, clause, []) | ||
| 129 | +. | ||
| 130 | + | ||
| 108 | public define Float | 131 | public define Float |
| 109 | get_count_float_by_full_clause | 132 | get_count_float_by_full_clause |
| 110 | ( | 133 | ( |