Class: E3DB::Record
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- E3DB::Record
- Defined in:
- lib/e3db/client.rb
Overview
A E3DB record containing data and metadata. Records are a key/value mapping containing data serialized into strings. All records are encrypted prior to sending them to the server for storage, and decrypted in the client after they are read.
New records are written to the database by calling the Client#write method.
To read a record by their unique ID, use Client#read, or to query a set of records based on their attributes, use Client#query.
Instance Attribute Summary collapse
-
#data ⇒ Hash<String, String>
This record's application-specific data.
-
#meta ⇒ Meta
Meta-information about this record.
Instance Attribute Details
#data ⇒ Hash<String, String>
Returns this record's application-specific data.
148 149 150 151 152 153 154 155 156 |
# File 'lib/e3db/client.rb', line 148 class Record < Dry::Struct attribute :meta, Meta attribute :data, Types::Strict::Hash.default { Hash.new } # Allow updating metadata, used on destructive update. def () @meta = end end |
#meta ⇒ Meta
Returns meta-information about this record.
148 149 150 151 152 153 154 155 156 |
# File 'lib/e3db/client.rb', line 148 class Record < Dry::Struct attribute :meta, Meta attribute :data, Types::Strict::Hash.default { Hash.new } # Allow updating metadata, used on destructive update. def () @meta = end end |