class Roma::Storage::GroongaStorage

Public Class Methods

new() click to toggle source
Calls superclass method Roma::Storage::BasicStorage::new
   # File lib/roma/storage/groonga_storage.rb
 8 def initialize
 9   super
10   @ext_name = 'grn'
11 end

Public Instance Methods

get_stat() click to toggle source
Calls superclass method Roma::Storage::BasicStorage#get_stat
   # File lib/roma/storage/groonga_storage.rb
13 def get_stat
14   ret = super
15   @hdb.each_with_index do |hdb, i|
16     ret["storage[#{i}].path"] = File.expand_path(hdb.path)
17     ret["storage[#{i}].rnum"] = hdb.rnum
18   end
19   ret
20 end

Private Instance Methods

close_db(hdb) click to toggle source
   # File lib/roma/storage/groonga_storage.rb
29 def close_db(hdb)
30   hdb.close
31 end
open_db(fname) click to toggle source
   # File lib/roma/storage/groonga_storage.rb
23 def open_db(fname)
24   hdb = GroongaHash.new(fname)
25   hdb.open
26   hdb
27 end