diff options
Diffstat (limited to 'src/guff/model.cr')
-rw-r--r-- | src/guff/model.cr | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/guff/model.cr b/src/guff/model.cr index 515af4e..bd35629 100644 --- a/src/guff/model.cr +++ b/src/guff/model.cr @@ -26,7 +26,7 @@ module Guff key : Symbol, args : Array(String) | Hash(String, String) | Nil, tmpl_args : Hash(String, String) | Nil, - &block : Proc(Hash(String, ::SQLite3::Value), Nil) \ + &block : Hash(String, ::SQLite3::Value) -> \ ) @db.all(key, args, tmpl_args, &block) end @@ -39,11 +39,19 @@ module Guff @db.query(key, args, tmpl_args) end + def transaction(&block) + @db.transaction(&block) + end + def template( key : Symbol, args : Hash(String, String) | Nil ) @db.template(key, args) end + + def last_insert_row_id + @db.last_insert_row_id + end end end |