Nebulex v1.0.1 Nebulex.Adapter.Queryable behaviour View Source
Specifies the query API required from adapters.
Link to this section Summary
Link to this section Types
Link to this type
cache()
View Source
cache()
View Source
cache() :: Nebulex.Cache.t()
cache() :: Nebulex.Cache.t()
Link to this type
opts()
View Source
opts()
View Source
opts() :: Nebulex.Cache.opts()
opts() :: Nebulex.Cache.opts()
Link to this section Callbacks
Link to this callback
all(cache, query, opts) View Source
Fetches all entries from cache matching the given query.
If the query is nil, it fetches all entries from cache; this is common
for all adapters. However, the query could be any other value, that
depends entirely on the adapter's implementation. Therefore, it is
recommended to check out adapters documentation. For instance, the built-in
Nebulex.Adapters.Local adapter supports :ets.match_spec() as query.
May raise Nebulex.QueryError if query validation fails.
See Nebulex.Cache.all/2.
Link to this callback
stream(cache, query, opts)
View Source
stream(cache, query, opts)
View Source
stream(cache(), query :: nil | any(), opts()) :: Enumerable.t()
stream(cache(), query :: nil | any(), opts()) :: Enumerable.t()
Streams the given query.
It returns a stream of values.
May raise Nebulex.QueryError if query validation fails.