yakischloba-drizzle-ffi 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/drizzle.gemspec +1 -1
- data/lib/drizzle/drizzle.rb +2 -0
- metadata +1 -1
data/drizzle.gemspec
CHANGED
data/lib/drizzle/drizzle.rb
CHANGED
@@ -78,6 +78,7 @@ module Drizzle
|
|
78
78
|
attach_function :con_status, :drizzle_con_status, [:pointer], :int
|
79
79
|
attach_function :con_fd, :drizzle_con_fd, [:pointer], :int
|
80
80
|
attach_function :con_clone, :drizzle_con_clone, [:pointer, :pointer, :pointer], :pointer
|
81
|
+
attach_function :con_set_tcp, :drizzle_con_set_tcp, [:pointer, :string, :int], :void
|
81
82
|
|
82
83
|
# Querying
|
83
84
|
attach_function :query_str, :drizzle_query_str, [:pointer, :pointer, :string, :pointer], :pointer
|
@@ -148,6 +149,7 @@ module Drizzle
|
|
148
149
|
@conn = Connptr.new(Drizzle.con_create(@drizzle, nil))
|
149
150
|
Drizzle.con_add_options(@conn, opts.inject(0){|i,o| i | Drizzle.enum_value(o)} | Drizzle.enum_value(:DRIZZLE_CON_NO_RESULT_READ))
|
150
151
|
Drizzle.con_set_auth(@conn, @user, @pass)
|
152
|
+
Drizzle.con_set_tcp(@conn, @host, (opts.include?(:DRIZZLE_CON_MYSQL) ? 3306 : 4427))
|
151
153
|
Drizzle.con_set_db(@conn, @db) if @db
|
152
154
|
@retptr = FFI::MemoryPointer.new(:int)
|
153
155
|
end
|