class RethinkORM::Lock::Reentrant
- RethinkORM::Lock::Reentrant
- RethinkORM::Lock
- RethinkORM::Base
- ActiveModel::Model
- Reference
- Object
Defined in:
rethinkdb-orm/lock/reentrant.crConstant Summary
- 
        CALLBACKS = {before_save: [] of Nil, after_save: [] of Nil, before_create: [] of Nil, after_create: [] of Nil, before_update: [] of Nil, after_update: [] of Nil, before_destroy: [] of Nil, after_destroy: [] of Nil}
Constructors
- 
        .from_trusted_json(string_or_io : String | IO) : self
        
          Serialize from a trusted JSON source 
- 
        .from_trusted_yaml(string_or_io : String | IO) : self
        
          Serialize from a trusted YAML source 
- .new(key : String, expire : Time::Span | Nil = nil, timeout : Time::Span | Nil = nil, instance_token : String = Lock.new_instance_token)
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(lock_count : Int32 | Nil = nil, id : String | Nil | Nil = nil, key : String | Nil = nil, instance_token : String | Nil = nil, expires_at : Time | Nil = nil)
- 
        .new(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
        
          Initialize RethinkORM::Lock::Reentrant from HTTP::Params.
Class Method Summary
- 
        .attributes : Array(Symbol)
        
          Returns all attribute keys. 
- 
        .table_name
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
Instance Method Summary
- 
        #after_create
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #after_destroy
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #after_save
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #after_update
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #apply_defaults
        
          Generate code to apply default values 
- 
        #assign_attributes(lock_count : Int32 | Missing = Missing, id : String | Nil | Missing = Missing, key : String | Missing = Missing, instance_token : String | Missing = Missing, expires_at : Time | Missing = Missing)
        
          Assign to multiple attributes. 
- 
        #assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String))
        
          Assign to mulitple attributes via HTTP::Params.
- 
        #assign_attributes_from_json(json)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #assign_attributes_from_trusted_json(json)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #assign_attributes_from_trusted_yaml(yaml)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #assign_attributes_from_yaml(yaml)
        
          Uses the YAML parser as JSON is valid YAML 
- 
        #attributes
        
          Returns a Hashof all attribute values
- 
        #attributes_tuple
        
          Returns a NamedTupleof all attribute values.
- 
        #before_create
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #before_destroy
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #before_save
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #before_update
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #changed?
        
          Check if any attributes have changed. 
- 
        #changed_attributes
        
          Returns a Hashwith all changed attributes.
- 
        #changed_json(io : IO) : Nil
        
          Serialize the set of changed attributes to JSON. 
- 
        #changed_json : String
        
          Serialize the set of changed attributes to JSON. 
- 
        #changed_yaml(io : IO) : Nil
        
          Serialize the set of changed attributes to YAML. 
- 
        #changed_yaml : String
        
          Serialize the set of changed attributes to YAML. 
- 
        #clear_changes_information
        
          Reset changes for all attributes. 
- 
        #expires_at : Time
        
          #expires_atgetter
- 
        #expires_at=(value : Time)
        
          #expires_atsetter
- 
        #expires_at_change
        
          Returns { expires_at_was, expires_at }if#expires_athas changed.
- 
        #expires_at_changed?
        
          Check if #expires_atis in the set of changed attributes.
- 
        #expires_at_was : Time?
        
          Returns the previous value of #expires_at.
- 
        #expires_at_will_change!
        
          Include #expires_atin the set of changed attributes, whether it has changed or not.
- 
        #id : String | Nil
        
          #idgetter
- 
        #id=(value : String | Nil)
        
          #idsetter
- 
        #id_change
        
          Returns { id_was, id }if#idhas changed.
- 
        #id_changed?
        
          Check if #idis in the set of changed attributes.
- 
        #id_was : String?
        
          Returns the previous value of #id.
- 
        #id_will_change!
        
          Include #idin the set of changed attributes, whether it has changed or not.
- 
        #instance_token : String
        
          #instance_tokengetter
- 
        #instance_token=(value : String)
        
          #instance_tokensetter
- 
        #instance_token_change
        
          Returns { instance_token_was, instance_token }if#instance_tokenhas changed.
- 
        #instance_token_changed?
        
          Check if #instance_tokenis in the set of changed attributes.
- 
        #instance_token_was : String?
        
          Returns the previous value of #instance_token.
- 
        #instance_token_will_change!
        
          Include #instance_tokenin the set of changed attributes, whether it has changed or not.
- 
        #key : String
        
          #keygetter
- 
        #key=(value : String)
        
          #keysetter
- 
        #key_change
        
          Returns { key_was, key }if#keyhas changed.
- 
        #key_changed?
        
          Check if #keyis in the set of changed attributes.
- 
        #key_was : String?
        
          Returns the previous value of #key.
- 
        #key_will_change!
        
          Include #keyin the set of changed attributes, whether it has changed or not.
- 
        #lock_count : Int32
        
          #lock_countgetter
- 
        #lock_count=(value : Int32)
        
          Override the map json #lock_countsetter
- 
        #lock_count_change
        
          Returns { lock_count_was, lock_count }if#lock_counthas changed.
- 
        #lock_count_changed?
        
          Check if #lock_countis in the set of changed attributes.
- 
        #lock_count_default : Int32
        
          #lock_count's default value
- 
        #lock_count_was : Int32?
        
          Returns the previous value of #lock_count.
- 
        #lock_count_will_change!
        
          Include #lock_countin the set of changed attributes, whether it has changed or not.
- 
        #persistent_attributes
        
          Returns a Hashof all attributes that can be persisted.
- 
        #restore_attributes
        
          Reset each attribute to their previous values and clears all changes. 
- 
        #run_create_callbacks(&)
        
          Wrap a block with callbacks for the appropriate crud operation 
- 
        #run_destroy_callbacks(&)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #run_save_callbacks(&)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #run_update_callbacks(&)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #table_name
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #to_json(json : JSON::Builder)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- 
        #to_yaml(__temp_124 : YAML::Nodes::Builder)
        
          DB locks for RethinkDB TODO: Conform to the NoBrainer locking interface. 
- #try_lock(expire : Time::Span = self.expire)
- #unlock
- 
        #validate_nilability
        
          Validate that all non-nillable fields have values. 
Instance methods inherited from class RethinkORM::Lock
  
  
    
      after_create
    after_create, 
    
  
    
      after_destroy
    after_destroy, 
    
  
    
      after_save
    after_save, 
    
  
    
      after_update
    after_update, 
    
  
    
      apply_defaults
    apply_defaults, 
    
  
    
      assign_attributes(id : String | Nil | Missing = Missing, key : String | Missing = Missing, instance_token : String | Missing = Missing, expires_at : Time | Missing = Missing)assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String)) assign_attributes, assign_attributes_from_json(json) assign_attributes_from_json, assign_attributes_from_trusted_json(json) assign_attributes_from_trusted_json, assign_attributes_from_trusted_yaml(yaml) assign_attributes_from_trusted_yaml, assign_attributes_from_yaml(yaml) assign_attributes_from_yaml, attributes attributes, attributes_tuple attributes_tuple, before_create before_create, before_destroy before_destroy, before_save before_save, before_update before_update, changed? changed?, changed_attributes changed_attributes, changed_json(io : IO) : Nil
changed_json : String changed_json, changed_yaml(io : IO) : Nil
changed_yaml : String changed_yaml, clear_changes_information clear_changes_information, expire : Time::Span expire, expire=(expire : Time::Span) expire=, expires_at : Time expires_at, expires_at=(value : Time) expires_at=, expires_at_change expires_at_change, expires_at_changed? expires_at_changed?, expires_at_default : Time expires_at_default, expires_at_was : Time? expires_at_was, expires_at_will_change! expires_at_will_change!, id : String | Nil id, id=(value : String | Nil) id=, id_change id_change, id_changed? id_changed?, id_default : String | Nil id_default, id_was : String? id_was, id_will_change! id_will_change!, instance_token : String instance_token, instance_token=(value : String) instance_token=, instance_token_change instance_token_change, instance_token_changed? instance_token_changed?, instance_token_default : String instance_token_default, instance_token_was : String? instance_token_was, instance_token_will_change! instance_token_will_change!, key : String key, key=(value : String) key=, key_change key_change, key_changed? key_changed?, key_default : String key_default, key_was : String? key_was, key_will_change! key_will_change!, lock(expire : Time::Span = self.expire, timeout : Time::Span = self.timeout) lock, locked? : Bool locked?, persistent_attributes persistent_attributes, refresh(expire : Time::Span | Nil = nil) refresh, restore_attributes restore_attributes, run_create_callbacks(&) run_create_callbacks, run_destroy_callbacks(&) run_destroy_callbacks, run_save_callbacks(&) run_save_callbacks, run_update_callbacks(&) run_update_callbacks, synchronize(**options, &) synchronize, table_name table_name, timeout : Time::Span timeout, timeout=(timeout : Time::Span) timeout=, to_json(json : JSON::Builder) to_json, to_yaml(__temp_96 : YAML::Nodes::Builder) to_yaml, try_lock(expire : Time::Span = self.expire) try_lock, unlock unlock, validate_nilability validate_nilability
Constructor methods inherited from class RethinkORM::Lock
  
  
    
      from_trusted_json(string_or_io : String | IO) : self
    from_trusted_json, 
    
  
    
      from_trusted_yaml(string_or_io : String | IO) : self
    from_trusted_yaml, 
    
  
    
      new(key : String, expire : Time::Span | Nil = nil, timeout : Time::Span | Nil = nil, instance_token : String = Lock.new_instance_token)new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
new(id : String | Nil | Nil = nil, key : String | Nil = nil, instance_token : String | Nil = nil, expires_at : Time | Nil = nil)
new(params : HTTP::Params | Hash(String, String) | Tuple(String, String)) new
Class methods inherited from class RethinkORM::Lock
  
  
    
      attributes : Array(Symbol)
    attributes, 
    
  
    
      expired
    expired, 
    
  
    
      find(key)
    find, 
    
  
    
      table_name
    table_name
    
  
  
    
  Instance methods inherited from class RethinkORM::Base
  
  
    
      ==(other : self)
    ==, 
    
  
    
      apply_defaults
    apply_defaults, 
    
  
    
      assign_attributes(id : String | Nil | Missing = Missing)assign_attributes(params : HTTP::Params | Hash(String, String) | Tuple(String, String)) assign_attributes, attributes attributes, attributes_tuple attributes_tuple, id_default : String | Nil id_default, persistent_attributes persistent_attributes, uuid_generator=(generator : Class) uuid_generator=
Class methods inherited from class RethinkORM::Base
  
  
    
      all(**options)
    all, 
    
  
    
      attributes : Array(Symbol)
    attributes, 
    
  
    
      changes(id : String | Nil = nil, **options)changes(**options, & : RethinkDB::Table -> HasChanges) changes, clear clear, collection_query(**options, &) collection_query, count
count(**attrs)
count(**attrs, &predicate : RethinkDB::DatumTerm -> RethinkDB::DatumTerm) count, create(**attributes) create, create!(**attributes) create!, exists?(id : String, **options) exists?, find(id : String, **options) find, find!(id : String, **options) find!, find_all(ids : Array | Tuple, **options) find_all, find_by(**attribute)
find_by(**attribute, &predicate : RethinkDB::DatumTerm -> RethinkDB::DatumTerm) find_by, get_all(values : Array | Tuple, **options) get_all, has_index?(field) has_index?, raw_changes(id : String | Nil = nil, **options)
raw_changes(**options, & : RethinkDB::Table -> HasChanges) raw_changes, raw_query(**options, &) raw_query, table_query(**options, &) table_query, where(&predicate : RethinkDB::DatumTerm -> RethinkDB::DatumTerm)
where(**attrs, &predicate : RethinkDB::DatumTerm -> RethinkDB::DatumTerm)
where(attrs : Hash, **options)
where(**attrs) where
Instance methods inherited from module RethinkORM::Persistence
  
  
    
      delete
    delete, 
    
  
    
      destroy
    destroy, 
    
  
    
      destroyed
    destroyed, 
    
  
    
      destroyed=(destroyed)
    destroyed=, 
    
  
    
      destroyed?
    destroyed?, 
    
  
    
      new_record?
    new_record?, 
    
  
    
      persisted?
    persisted?, 
    
  
    
      reload!
    reload!, 
    
  
    
      save(**options)
    save, 
    
  
    
      save!(**options)
    save!, 
    
  
    
      update(**attributes)
    update, 
    
  
    
      update!(**attributes)
    update!, 
    
  
    
      update_fields(**attributes)
    update_fields
    
  
    
    
  
    
    
    
  
    
  Instance methods inherited from module RethinkORM::Associations
  
  
    
      reset_associations
    reset_associations
    
  
    
    
  
    
    
    
  
    
    
    
  
    
    
    
  
    
    
    
  
    
    
    
  
Constructor Detail
Serialize from a trusted JSON source
Serialize from a trusted YAML source
Initialize RethinkORM::Lock::Reentrant from HTTP::Params.
Class Method Detail
DB locks for RethinkDB
TODO Conform to the NoBrainer locking interface.
Instance Method Detail
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.
Assign to multiple attributes.
Assign to mulitple attributes via HTTP::Params.
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.
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.
Returns { instance_token_was, instance_token } if #instance_token has changed.
Include #instance_token in the set of changed attributes, whether it has changed or not.
Include #key in the set of changed attributes, whether it has changed or not.
Include #lock_count in the set of changed attributes, whether it has changed or not.
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.
DB locks for RethinkDB
TODO Conform to the NoBrainer locking interface.