Module: Store::Digest::Meta
- Included in:
- LMDB
- Defined in:
- lib/store/digest/meta.rb
Overview
This is an abstract module for metadata operations. All required methods are defined, and raise NotImplementedError.
Defined Under Namespace
Modules: LMDB Classes: CorruptStateError
Instance Method Summary collapse
-
#algorithms ⇒ Array
Return the set of algorithms initialized in the database.
-
#bytes ⇒ Integer
Return the number of bytes stored in the database (notwithstanding the database itself).
-
#deleted ⇒ Integer
Return the number of objects whose payloads are deleted but are still on record.
-
#list(type: nil, charset: nil, encoding: nil, language: nil, size: nil, ctime: nil, mtime: nil, ptime: nil, dtime: nil, sort: nil) ⇒ Array
Return a list of objects matching the given criteria.
-
#objects ⇒ Integer
Return the number of objects in the database.
-
#primary ⇒ Symbol
Return the primary digest algorithm.
-
#transaction(&block) ⇒ Object
Wrap the block in a transaction.
Instance Method Details
#algorithms ⇒ Array
Return the set of algorithms initialized in the database.
112 113 114 |
# File 'lib/store/digest/meta.rb', line 112 def algorithms raise NotImplementedError end |
#bytes ⇒ Integer
Return the number of bytes stored in the database (notwithstanding the database itself).
146 147 148 |
# File 'lib/store/digest/meta.rb', line 146 def bytes raise NotImplementedError end |
#deleted ⇒ Integer
Return the number of objects whose payloads are deleted but are still on record.
137 138 139 |
# File 'lib/store/digest/meta.rb', line 137 def deleted raise NotImplementedError end |
#list(type: nil, charset: nil, encoding: nil, language: nil, size: nil, ctime: nil, mtime: nil, ptime: nil, dtime: nil, sort: nil) ⇒ Array
Return a list of objects matching the given criteria. The result set will be the intersection of all supplied parameters. ‘:type`, `:charset`, `:encoding`, and `:language` are treated like discrete sets, while the rest of the parameters are treated like ranges (two-element arrays). Single values will be coerced into arrays; single range values will be interpreted as an inclusive lower bound. To bound only at the top, use a two-element array with its first value `nil`, like so: `size: [nil, 31337]`. The sorting criteria are the symbols of the other parameters.
173 174 175 176 |
# File 'lib/store/digest/meta.rb', line 173 def list type: nil, charset: nil, encoding: nil, language: nil, size: nil, ctime: nil, mtime: nil, ptime: nil, dtime: nil, sort: nil raise NotImplementedError end |
#objects ⇒ Integer
Return the number of objects in the database.
128 129 130 |
# File 'lib/store/digest/meta.rb', line 128 def objects raise NotImplementedError end |
#primary ⇒ Symbol
Return the primary digest algorithm.
120 121 122 |
# File 'lib/store/digest/meta.rb', line 120 def primary raise NotImplementedError end |
#transaction(&block) ⇒ Object
Wrap the block in a transaction.
104 105 106 |
# File 'lib/store/digest/meta.rb', line 104 def transaction &block raise NotImplementedError end |