class CryBase::CouchBase::Services::KV::CollectionContext(Target)

Defined in:

crybase/couchbase/services/kv/collection_context.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(target : Target, *, scope : String, collection : String) #

[View source]

Instance Method Detail

def collection : String #

[View source]
def collection_id : UInt32 #

[View source]
def decrement(key : String, delta : UInt64 = 1_u64, initial : UInt64 = 0_u64, expiry : UInt32 = 0_u32) : UInt64 #

[View source]
def delete(key : String) : Nil #

[View source]
def get(key : String, expiry : UInt32 | Nil = nil) : Bytes #

[View source]
def get(key : String, type : T.class, expiry : UInt32 | Nil = nil) : T forall T #

[View source]
def get_as(key : String, type : T.class, expiry : UInt32 | Nil = nil) : T forall T #

[View source]
def increment(key : String, delta : UInt64 = 1_u64, initial : UInt64 = 0_u64, expiry : UInt32 = 0_u32) : UInt64 #

[View source]
def scope : String #

[View source]
def set(key : String, value : String | Bytes, expiry : UInt32 = 0_u32) : UInt64 #

[View source]
def set(key : String, value : T, expiry : UInt32 = 0_u32) : UInt64 forall T #

[View source]
def target : Target #

[View source]
def touch(key : String, expiry : UInt32) : UInt64 #

[View source]