update to crystal-db feature/5-type-extensibility branch

This commit is contained in:
Brian J. Cardiff 2016-06-21 12:47:12 -03:00
parent 07ba7d6d51
commit 3b4b32e4e6
2 changed files with 7 additions and 3 deletions

View file

@ -1,7 +1,11 @@
name: sqlite3
version: 0.1.0
dependencies:
db:
github: bcardiff/crystal-db
branch: feature/5-type-extensibility
authors:
- Ary Borenszweig <aborenszweig@manas.com.ar>
- Brian J. Cardiff <bcardiff@manas.com.ar>

View file

@ -4,7 +4,7 @@ class SQLite3::Statement < DB::Statement
check LibSQLite3.prepare_v2(@connection, sql, sql.bytesize + 1, out @stmt, nil)
end
protected def perform_query(args : Slice(DB::Any))
protected def perform_query(args : Enumerable) : DB::ResultSet
LibSQLite3.reset(self)
args.each_with_index(1) do |arg, index|
bind_arg(index, arg)
@ -12,7 +12,7 @@ class SQLite3::Statement < DB::Statement
ResultSet.new(self)
end
protected def perform_exec(args : Slice(DB::Any))
protected def perform_exec(args : Enumerable) : DB::ExecResult
rs = perform_query(args)
rs.move_next
rs.close