Skip to content

Commit 8e4056d

Browse files
committed
Get rid of DBI dependency
1 parent 917de57 commit 8e4056d

File tree

5 files changed

+6
-16
lines changed

5 files changed

+6
-16
lines changed

README.md

-6
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,6 @@ A total of 67,000 insert queries were executed batch wise in batch sizes of 50,
7171

7272
![alt tag](https://raw.githubusercontent.com/nkottary/nishanth.github.io/master/plot.png)
7373

74-
# Types (Derived from [DBI.jl](https://github.com/JuliaDB/DBI.jl))
75-
76-
* `MySQL5`: An abstract subtype of DBI.DatabaseSystem
77-
* `MySQLDatabaseHandle`: A subtype of DBI.DatabaseHandle
78-
* `MySQLStatementHandle`: A subtype of DBI.StatementHandle
79-
8074
# Acknowledgement
8175

8276
The generous inputs and help from Just Dial ™, Bangalore is greatly appreciated.

REQUIRE

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
DBI
21
Dates
32
DataFrames

src/MySQL.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
module MySQL
2-
using DBI
32

43
include("config.jl")
54
include("consts.jl")
65
include("types.jl")
76
include("api.jl")
87
include("handy.jl")
98

10-
export MySQL5
119
export MySQLDatabaseHandle
10+
export MySQLStatementHandle
1211
export CLIENT_MULTI_STATEMENTS
1312

1413
include("dfconvert.jl")

src/api.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function mysql_stmt_init(dbptr::Ptr{Cuchar})
159159
dbptr)
160160
end
161161

162-
function mysql_stmt_init(db::DBI.DatabaseHandle)
162+
function mysql_stmt_init(db::MySQLDatabaseHandle)
163163
return mysql_stmt_init(db.ptr)
164164
end
165165

src/types.jl

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
using Dates
22

3-
abstract MySQL5 <: DBI.DatabaseSystem
4-
53
"""
64
Julia wrapper for MySQL database handle. Used for passing to mysql_init,
75
mysql_real_connect, mysql_close etc.
86
"""
9-
type MySQLDatabaseHandle <: DBI.DatabaseHandle
7+
type MySQLDatabaseHandle
108
ptr::Ptr{Cuchar}
119
status::Cint
1210
end
@@ -15,7 +13,7 @@ end
1513
Julia wrapper for MySQL statement handle. Used for prepared statement
1614
API's.
1715
"""
18-
type MySQLStatementHandle <: DBI.StatementHandle
16+
type MySQLStatementHandle
1917
db::MySQLDatabaseHandle
2018
ptr::Ptr{Cuchar}
2119
executed::Int
@@ -154,7 +152,7 @@ Mirror to MYSQL_STMT struct in mysql.h
154152
type MYSQL_STMT
155153
mem_root::MEM_ROOT
156154
list::LIST
157-
mysql::MySQL5
155+
mysql::MYSQL
158156
params::MYSQL_BIND
159157
bind::MYSQL_BIND
160158
fields::MYSQL_FIELD
@@ -180,4 +178,4 @@ type MYSQL_STMT
180178
unbuffered_fetch_cancelled::Cint
181179
update_max_length::Cint
182180
extension::Ptr{Cuchar}
183-
end
181+
end

0 commit comments

Comments
 (0)