class XapianDb::InMemoryDatabase

In Memory database

Public Class Methods

new() click to toggle source
    # File lib/xapian_db/database.rb
179 def initialize
180   @writer ||= Xapian::inmemory_open
181   @reader = @writer
182 end

Public Instance Methods

commit() click to toggle source

Commit all pending changes

    # File lib/xapian_db/database.rb
191 def commit
192   # Nothing to do for an in memory database
193 end
reset() click to toggle source

Reset (empty) the database

    # File lib/xapian_db/database.rb
196 def reset
197   @writer = Xapian::inmemory_open
198   @reader = @writer
199 end
writer() click to toggle source

Get the writer to write to the database @return [Xapian::WritableDatabase] A xapian database that is writable (see xapian.org/docs/apidoc/html/classXapian_1_1WritableDatabase.html)

    # File lib/xapian_db/database.rb
186 def writer
187   @writer
188 end