aboutsummaryrefslogtreecommitdiff
path: root/src/guff/template-database.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/guff/template-database.cr')
-rw-r--r--src/guff/template-database.cr14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/guff/template-database.cr b/src/guff/template-database.cr
index 7ff9690..bfe8321 100644
--- a/src/guff/template-database.cr
+++ b/src/guff/template-database.cr
@@ -23,7 +23,7 @@ module Guff
key : Symbol,
args : Array(String) | Hash(String, String) | Nil,
tmpl_args : Hash(String, String)?,
- &block : Proc(Hash(String, ::SQLite3::Value), Nil) \
+ &block : Hash(String, ::SQLite3::Value) -> \
)
@db.all(template(key, tmpl_args), args, &block)
end
@@ -42,5 +42,17 @@ module Guff
)
@templates[key].run(args)
end
+
+ def last_insert_row_id
+ @db.last_insert_row_id
+ end
+
+ def quote(s) : String
+ @db.quote(s)
+ end
+
+ def transaction(&block)
+ @db.transaction(&block)
+ end
end
end