Class: ThinkingSphinx::Connection::JRuby
- Inherits:
-
Object
- Object
- ThinkingSphinx::Connection::JRuby
- Defined in:
- lib/thinking_sphinx/connection.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #execute(statement) ⇒ Object
-
#initialize(address, port, options) ⇒ JRuby
constructor
A new instance of JRuby.
- #query(statement) ⇒ Object
- #query_all(*statements) ⇒ Object
Constructor Details
#initialize(address, port, options) ⇒ JRuby
97 98 99 100 101 |
# File 'lib/thinking_sphinx/connection.rb', line 97 def initialize(address, port, ) address = "jdbc:mysql://#{address}:#{searchd.mysql41}" @client = java.sql.DriverManager.getConnection address, [:username], [:password] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
95 96 97 |
# File 'lib/thinking_sphinx/connection.rb', line 95 def client @client end |
Instance Method Details
#execute(statement) ⇒ Object
103 104 105 |
# File 'lib/thinking_sphinx/connection.rb', line 103 def execute(statement) client.createStatement.execute statement end |
#query(statement) ⇒ Object
107 108 109 |
# File 'lib/thinking_sphinx/connection.rb', line 107 def query(statement) # end |
#query_all(*statements) ⇒ Object
111 112 113 |
# File 'lib/thinking_sphinx/connection.rb', line 111 def query_all(*statements) # end |