exredis alternatives and similar packages
Based on the "ORM and Datamapping" category.
Alternatively, view exredis alternatives based on common mentions on social networks and blogs.
-
paper_trail
Track and record all the changes in your database with Ecto. Revert back to anytime in history. -
ecto_psql_extras
Ecto PostgreSQL database performance insights. Locks, index usage, buffer cache hit ratios, vacuum stats and more.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of exredis or a related project?
Popular Comparisons
README
Redis
Redis commands for Elixir. If you are looking for exredis, please check out exredis branch.
Installation
Add this to the dependencies:
{:redis, "~> 0.1"}
Usage
Redis commands have a few simple types: enums, commands and primitive. Types can be required and optional, multiple and variadic, can be composite.
Situation with required and optional types is simple: required types are just arguments in function and optional values passed with the last argument — opts
. opts is just a list, opts described in typespecs for each command.
Multiple arguments are arguments that contain one or more values. Multiple arguments can be optional.
Enum types in Redis is just a enumerable (usually), take a look at xx | nx
enum:
iex> Redis.set("key", "value", [:xx])
["SET", [" ", "key"], [" ", "value"], [], [" ", "XX"]]
iex> Redis.set("key", "value", [:nx])
["SET", [" ", "key"], [" ", "value"], [], [" ", "NX"]]
Commands are prefixed types, commands can wrap primitive types, enums and composite types:
# command with enum inside
iex> Redis.client_kill(type: :master)
["CLIENT KILL", [], [], [" ", ["TYPE", " ", "master"]], [], []]
# command with primitive type inside
iex> Redis.client_kill(id: "identity")
["CLIENT KILL", [], [" ", ["ID", " ", "identity"]], [], [], []]
# command with composite type inside, inner type of get is: {String.t, integer()}
iex> Redis.bitfield("key", get: {"type", "offset"})
["BITFIELD", [" ", "key"], [" ", ["GET", " ", ["type", " ", "offset"]]], [], [], []]
You can see the usage for every Redis command in IEx:
iex> h Redis.set
def set(key, value, opts \\ [])
@spec set(
key :: key(),
value :: String.t(),
opts :: [
{:expiration, {:ex, :integer} | {:px, :integer}}
| (:nx | :xx)
| {:condition, :nx | :xx}
]
) :: iolist()
since: 1.0.0
Set the string value of a key
Group: string.
Or head to the documentation on hexdocs.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request