mirror of
https://gitea.invidious.io/iv-org/shard-crystal-sqlite3.git
synced 2024-08-15 00:53:26 +00:00
Annotate return types of abstract methods
This commit is contained in:
parent
54089ef97d
commit
058c78f837
3 changed files with 6 additions and 6 deletions
|
@ -12,11 +12,11 @@ class SQLite3::Connection < DB::Connection
|
||||||
URI.unescape((uri.host || "") + uri.path)
|
URI.unescape((uri.host || "") + uri.path)
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_prepared_statement(query)
|
def build_prepared_statement(query) : Statement
|
||||||
Statement.new(self, query)
|
Statement.new(self, query)
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_unprepared_statement(query)
|
def build_unprepared_statement(query) : Statement
|
||||||
# sqlite3 does not support unprepared statement.
|
# sqlite3 does not support unprepared statement.
|
||||||
# All statements once prepared should be released
|
# All statements once prepared should be released
|
||||||
# when unneeded. Unprepared statement are not aim
|
# when unneeded. Unprepared statement are not aim
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class SQLite3::Driver < DB::Driver
|
class SQLite3::Driver < DB::Driver
|
||||||
def build_connection(context : DB::ConnectionContext)
|
def build_connection(context : DB::ConnectionContext) : SQLite3::Connection
|
||||||
SQLite3::Connection.new(context)
|
SQLite3::Connection.new(context)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ class SQLite3::ResultSet < DB::ResultSet
|
||||||
# Advances to the next row. Returns `true` if there's a next row,
|
# Advances to the next row. Returns `true` if there's a next row,
|
||||||
# `false` otherwise. Must be called at least once to advance to the first
|
# `false` otherwise. Must be called at least once to advance to the first
|
||||||
# row.
|
# row.
|
||||||
def move_next
|
def move_next : Bool
|
||||||
@column_index = 0
|
@column_index = 0
|
||||||
|
|
||||||
case step
|
case step
|
||||||
|
@ -79,11 +79,11 @@ class SQLite3::ResultSet < DB::ResultSet
|
||||||
read(Int64?).try &.!=(0)
|
read(Int64?).try &.!=(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
def column_count
|
def column_count : Int32
|
||||||
LibSQLite3.column_count(self)
|
LibSQLite3.column_count(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
def column_name(index)
|
def column_name(index) : String
|
||||||
String.new LibSQLite3.column_name(self, index)
|
String.new LibSQLite3.column_name(self, index)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue