RethinkORM::Lock
Inherits RethinkORM::Base / RethinkORM::Validators / RethinkORM::Table / RethinkORM::Queries / RethinkORM::Persistence / RethinkORM::Index / RethinkORM::Associations / ActiveModel::Callbacks / ActiveModel::Validation / ActiveModel::Model / DB::Mappable / DB::Serializable / YAML::Serializable / JSON::Serializable / Reference / Object
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Constants
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Constructors
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Deserializes the given JSON in string_or_io into
an instance of self, assuming the JSON consists
of an JSON object with key root, and whose value is
the value to deserialize. Will not deserialise from
fields with mass_assign: false
class User < ActiveModel::Model
attribute name : String
attribute google_id : UUID, mass_assign: false
end
User.from_json(%({"main": {"name": "Jason", "google_id": "f6f70bfb-c882-446d-8758-7ce47db39620"}}), root: "main") # => #<User:0x103131b20 @name="Jason">
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Serialize from a trusted JSON source
Serialize from a trusted YAML source
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Reset instance token if it's loaded and expired?
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Initialize RethinkORM::Lock from HTTP::Params.
Class methods
Returns all attribute keys.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Instance methods
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Generate code to apply default values
Assign to multiple attributes.
Assign to multiple attributes via HTTP::Params.
Assign to multiple attributes from a model object
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Assign each field from JSON if field exists in JSON and has changed in model
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Uses the YAML parser as JSON is valid YAML
Returns a Hash of all attribute values
Returns a NamedTuple of all attribute values.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Check if any attributes have changed.
Returns a Hash with all changed attributes.
Serialize the set of changed attributes to JSON.
Serialize the set of changed attributes to JSON.
Serialize the set of changed attributes to YAML.
Serialize the set of changed attributes to YAML.
Reset changes for all attributes.
expires_at getter
expires_at setter
NOTE: use getter / getter! (not property / property!) so that the
setter defined later in __create_initializer__ is the only setter on
the field. Crystal's overload resolution silently fails to replace a
property-defined setter with one of identical signature for generic
types (e.g. Set(String)?, Array(String)?, String | Array(String)),
although it does work for non-generic ones like String?. Defining the
setter only once via __create_initializer__ ensures change tracking,
sanitization, and custom setter blocks run uniformly across all types.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Include expires_at in the set of changed attributes, whether it has changed or not.
id getter
id setter
instance_token getter
instance_token setter
NOTE: use getter / getter! (not property / property!) so that the
setter defined later in __create_initializer__ is the only setter on
the field. Crystal's overload resolution silently fails to replace a
property-defined setter with one of identical signature for generic
types (e.g. Set(String)?, Array(String)?, String | Array(String)),
although it does work for non-generic ones like String?. Defining the
setter only once via __create_initializer__ ensures change tracking,
sanitization, and custom setter blocks run uniformly across all types.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Include instance_token in the set of changed attributes, whether it has changed or not.
key getter
Setters
key setter
NOTE: use getter / getter! (not property / property!) so that the
setter defined later in __create_initializer__ is the only setter on
the field. Crystal's overload resolution silently fails to replace a
property-defined setter with one of identical signature for generic
types (e.g. Set(String)?, Array(String)?, String | Array(String)),
although it does work for non-generic ones like String?. Defining the
setter only once via __create_initializer__ ensures change tracking,
sanitization, and custom setter blocks run uniformly across all types.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Returns a Tuple of the previous and the current value of an instance variable if it has changed
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Key is not an index, PKs are 127 chars.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Include key in the set of changed attributes, whether it has changed or not.
Returns a Hash of all attributes that can be persisted.
Reset each attribute to their previous values and clears all changes.
DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface.
Validate that all non-nillable fields have values.