Commit 456d09864486ad1df77da2ed4b2d64da01781c2b
1 parent
ee6c417d
[+] add get_count_float_by_full_clause
Showing
1 changed file
with
15 additions
and
2 deletions
Show diff stats
controller/hk_sql_utils.anubis
| ... | ... | @@ -73,8 +73,21 @@ public define Int |
| 73 | 73 | )= |
| 74 | 74 | if sql_query_timeout(db, clause+";", [], "get_count_by_clause") is |
| 75 | 75 | { |
| 76 | - error(_) then 0, | |
| 77 | - ok(_, cursor, _) then db_get_Int(cursor) | |
| 76 | + error(sql_error) then println("get_count_by_full_clause SQL ERROR '"+ sql_error.text + "'\n clause ["+clause+";]");0, | |
| 77 | + ok(_, cursor, _) then println("get_count_by_full_clause OK ["+clause+"]");db_get_Int(cursor) | |
| 78 | + } | |
| 79 | +. | |
| 80 | + | |
| 81 | +public define Float | |
| 82 | + get_count_float_by_full_clause | |
| 83 | + ( | |
| 84 | + SQLite3DataBase db, | |
| 85 | + String clause | |
| 86 | + )= | |
| 87 | + if sql_query_timeout(db, clause+";", [], "get_count_by_clause") is | |
| 88 | + { | |
| 89 | + error(sql_error) then println("get_count_by_full_clause SQL ERROR '"+ sql_error.text + "'\n clause ["+clause+";]");0.0, | |
| 90 | + ok(_, cursor, _) then println("get_count_by_full_clause OK ["+clause+"]");db_get_Float(cursor) | |
| 78 | 91 | } |
| 79 | 92 | . |
| 80 | 93 | ... | ... |