module Session::QueryableStore(T)

Overview

Module for stores that support querying sessions

Generic Constraint: T must inherit from Session::Base This module should only be included by Store(T) subclasses

Direct including types

Defined in:

store.cr

Instance Method Summary

Instance Method Detail

abstract def all_session_ids : Array(String) #

Get all session IDs


[View source]
abstract def bulk_delete(&predicate : T -> Bool) : Int64 #

Delete all sessions matching a predicate


[View source]
def count_by(&predicate : T -> Bool) : Int64 #

Count sessions matching a predicate


[View source]
abstract def each_session(&block : T -> Nil) : Nil #

Iterate over all sessions matching a predicate


[View source]
def find_by(&predicate : T -> Bool) : Array(T) #

Find sessions matching a predicate


[View source]
def find_first(&predicate : T -> Bool) : T | Nil #

Find first session matching a predicate


[View source]