Class: Groonga::Database

Inherits:
Object
  • Object
show all
Defined in:
ext/groonga/rb-grn-database.c,
lib/groonga/database.rb

Overview

テーブルの集合を管理するためのオブジェクト。

コンテキストに結びつけて使用する。通常、アプリケーション 毎に1つのコンテキストを利用するので、データベースも1つだ け利用する。コンテキストと違い、データベースは暗黙のうち に作成されないので明示的に作成する必要がある。

Instance Method Summary collapse

Instance Method Details

#dump_index(output_directory) ⇒ Object



27
28
29
30
31
32
# File 'lib/groonga/database.rb', line 27

def dump_index(output_directory)
  each do |object|
    next unless object.is_a?(Groonga::IndexColumn)
    object.dump(output_directory)
  end
end

#tablesArray<Groonga::Table>

Returns tables defined in the database.

Returns:



21
22
23
24
25
# File 'lib/groonga/database.rb', line 21

def tables
  find_all do |object|
    object.is_a?(Groonga::Table)
  end
end