Class: ThinkingSphinx::Connection::JRuby

Inherits:
Object
  • Object
show all
Defined in:
lib/thinking_sphinx/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address, port, options) ⇒ JRuby

Returns a new instance of JRuby.



96
97
98
99
100
# File 'lib/thinking_sphinx/connection.rb', line 96

def initialize(address, port, options)
  address = "jdbc:mysql://#{address}:#{searchd.mysql41}"
  @client = java.sql.DriverManager.getConnection address,
    options[:username], options[:password]
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



94
95
96
# File 'lib/thinking_sphinx/connection.rb', line 94

def client
  @client
end

Instance Method Details

#execute(statement) ⇒ Object



102
103
104
# File 'lib/thinking_sphinx/connection.rb', line 102

def execute(statement)
  client.createStatement.execute statement
end

#query(statement) ⇒ Object



106
107
108
# File 'lib/thinking_sphinx/connection.rb', line 106

def query(statement)
  #
end

#query_all(*statements) ⇒ Object



110
111
112
# File 'lib/thinking_sphinx/connection.rb', line 110

def query_all(*statements)
  #
end