| Class | Rddb::MaterializationStore::FilesystemMaterializationStore |
| In: |
lib/rddb/materialization_store/filesystem_materialization_store.rb
|
| Parent: | Base |
Materialization store implementation that stores view data in the file system.
Delete the view.
# File lib/rddb/materialization_store/filesystem_materialization_store.rb, line 36
36: def delete(name)
37: File.delete(File.join(basedir, name)) if exists?(name)
38: end
Return true if the view exists in storage.
# File lib/rddb/materialization_store/filesystem_materialization_store.rb, line 41
41: def exists?(name)
42: File.exist?(File.join(basedir, name))
43: end
Find the view.
# File lib/rddb/materialization_store/filesystem_materialization_store.rb, line 18
18: def find(name)
19: if exists?(name)
20: File.open(File.join(basedir, name)) do |f|
21: Marshal.load(f)
22: end
23: end
24: end