Class: GroongaClientModel::Schema
- Inherits:
-
Object
- Object
- GroongaClientModel::Schema
- Defined in:
- lib/groonga_client_model/schema.rb
Defined Under Namespace
Classes: Columns, Table, Tables
Instance Method Summary collapse
-
#initialize ⇒ Schema
constructor
A new instance of Schema.
- #tables ⇒ Object
Constructor Details
#initialize ⇒ Schema
Returns a new instance of Schema.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/groonga_client_model/schema.rb', line 19 def initialize @raw = GroongaClientModel::Client.open do |client| response = client.schema unless response.success? = "failed to retrieve schema: " << "#{response.return_code}:#{response.error_message}" raise Error, end response end end |
Instance Method Details
#tables ⇒ Object
31 32 33 |
# File 'lib/groonga_client_model/schema.rb', line 31 def tables Tables.new(@raw, @raw.tables) end |