aboutsummaryrefslogtreecommitdiff
path: root/src/guff/model.cr
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-03-08 03:27:56 -0500
committerPaul Duncan <pabs@pablotron.org>2016-03-08 03:27:56 -0500
commit623292eb16593a02e11786116ab6efd5a14047fe (patch)
tree1fa00d849c6fe304c93bcb1afdeb19ca56e7429e /src/guff/model.cr
parent4a5da91ee4df8b6ca886e4c2433fb04bc6499041 (diff)
downloadold-guff-623292eb16593a02e11786116ab6efd5a14047fe.tar.bz2
old-guff-623292eb16593a02e11786116ab6efd5a14047fe.zip
lots of fixes
Diffstat (limited to 'src/guff/model.cr')
-rw-r--r--src/guff/model.cr10
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