@@ -26,11 +26,11 @@ sqliteerror(db) = throw(SQLiteException(bytestring(sqlite3_errmsg(db.handle))))
26
26
27
27
" represents an SQLite database, either backed by an on-disk file or in-memory"
28
28
type DB
29
- file:: UTF8String
29
+ file: :@compat (String)
30
30
handle:: Ptr{Void}
31
31
changes:: Int
32
32
33
- function DB (f:: UTF8String )
33
+ function DB (f: :@compat (String) )
34
34
handle = Ref {Ptr{Void}} ()
35
35
f = isempty (f) ? f : expanduser (f)
36
36
if @OK sqliteopen (f,handle)
@@ -45,7 +45,7 @@ type DB
45
45
end
46
46
end
47
47
" `SQLite.DB(file::AbstractString)` opens or creates an SQLite database with `file`"
48
- DB (f:: AbstractString ) = DB (utf8 (f) )
48
+ DB (f:: AbstractString ) = DB (f )
49
49
" `SQLite.DB()` creates an in-memory SQLite database"
50
50
DB () = DB (" :memory:" )
51
51
@@ -79,7 +79,7 @@ function _close(stmt::Stmt)
79
79
return
80
80
end
81
81
82
- sqliteprepare (db,sql,stmt,null) = @CHECK db sqlite3_prepare_v2 (db. handle,utf8 ( sql) ,stmt,null)
82
+ sqliteprepare (db,sql,stmt,null) = @CHECK db sqlite3_prepare_v2 (db. handle,sql,stmt,null)
83
83
84
84
# TO DEPRECATE
85
85
type SQLiteDB{T<: AbstractString }
@@ -131,7 +131,7 @@ bind!(stmt::Stmt,i::Int,val::PointerString{UInt16}) = (sqlite3_bind_text16(stmt
131
131
bind! (stmt:: Stmt ,i:: Int ,val:: UTF16String ) = (sqlite3_bind_text16 (stmt. handle,i,val); return nothing )
132
132
function bind! (stmt:: Stmt ,i:: Int ,val:: PointerString{UInt32} )
133
133
A = UTF32String (pointer_to_array (val. ptr, val. len+ 1 , false ))
134
- return bind! (stmt, i, convert (UTF8String ,A))
134
+ return bind! (stmt, i, convert (@compat (String) ,A))
135
135
end
136
136
# We may want to track the new ByteVec type proposed at https://github.com/JuliaLang/julia/pull/8964
137
137
# as the "official" bytes type instead of Vector{UInt8}
310
310
type Sink <: Data.Sink # <: IO
311
311
schema:: Data.Schema
312
312
db:: DB
313
- tablename:: UTF8String
313
+ tablename: :@compat (String)
314
314
stmt:: Stmt
315
315
end
316
316
0 commit comments