class XapianDb::InMemoryDatabase
In Memory database
Public Class Methods
Source
# File lib/xapian_db/database.rb 179 def initialize 180 @writer ||= Xapian::inmemory_open 181 @reader = @writer 182 end
Public Instance Methods
Source
# File lib/xapian_db/database.rb 191 def commit 192 # Nothing to do for an in memory database 193 end
Commit all pending changes
Source
# File lib/xapian_db/database.rb 196 def reset 197 @writer = Xapian::inmemory_open 198 @reader = @writer 199 end
Reset (empty) the database
Source
# File lib/xapian_db/database.rb 186 def writer 187 @writer 188 end
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)