Permalink
Browse files

Updated to Crystal > 0.15.0

  • Loading branch information...
1 parent 6e1a6fe commit b1c6c32ae563d5f4ae9cc1979883a91a18aa5bc4 @asterite asterite committed Apr 12, 2016
Showing with 7 additions and 5 deletions.
  1. +1 −1 shard.yml
  2. +1 −1 src/sqlite3/database.cr
  3. +2 −2 src/sqlite3/result_set.cr
  4. +3 −1 src/sqlite3/statement.cr
View
@@ -1,5 +1,5 @@
name: sqlite3
-version: 0.2.0
+version: 0.3.0
authors:
- Ary Borenszweig <aborenszweig@manas.com.ar>
@@ -59,7 +59,7 @@ class SQLite3::Database
# ```
def dump(to : SQLite3::Database)
backup_item = LibSQLite3.backup_init(to.@db, "main", @db, "main")
- if backup_item.nil?
+ if backup_item.null?
raise Exception.new(to.@db)
end
code = LibSQLite3.backup_step(backup_item, -1)
@@ -17,7 +17,7 @@
# ```
class SQLite3::ResultSet
# :nodoc:
- def initialize(@statement)
+ def initialize(@statement : Statement)
end
# Returns the number of columns.
@@ -50,7 +50,7 @@ class SQLite3::ResultSet
when LibSQLite3::Code::DONE
false
else
- raise Exception.new(@db)
+ raise Exception.new(@statement.db)
end
end
@@ -1,7 +1,9 @@
# A statement represents a prepared-but-unexecuted SQL query.
class SQLite3::Statement
+ getter db
+
# :nodoc:
- def initialize(@db, sql)
+ def initialize(@db : Database, sql : String)
check LibSQLite3.prepare_v2(@db, sql, sql.bytesize + 1, out @stmt, nil)
@closed = false
end

0 comments on commit b1c6c32

Please sign in to comment.