github nalgeon/redka v0.1.0

latest releases: v0.5.0, v0.4.0, v0.3.0...
one month ago

Redka aims to reimplement the good parts of Redis with SQLite, while remaining compatible with the Redis API. The first release on the way to 1.0 brings string commands, key management and transactions.

All commands are available via the Redis wire protocol (RESP) and the Go API.

InstallationUsageRoadmap

Strings

Redka supports the following string-related commands:

  • DECR - Decrements the integer value of a key by one.
  • DECRBY- Decrements a number from the integer value of a key.
  • GET - Returns the string value of a key.
  • GETSET - Sets the key to a new value and returns the prev value.
  • INCR - Increments the integer value of a key by one.
  • INCRBY - Increments the integer value of a key by a number.
  • INCRBYFLOAT - Increments the float value of a key by a number.
  • MGET - Returns the string values of one or more keys.
  • MSET - Sets the string values of one or more keys.
  • MSETNX - Sets the string values of one or more keys when all keys don't exist.
  • PSETEX - Sets the string value and expiration time (in ms) of a key.
  • SET - Sets the string value of a key.
  • SETEX - Sets the string value and expiration (in sec) time of a key.
  • SETNX - Sets the string value of a key when the key doesn't exist.

Key management

Redka supports the following key management (generic) commands:

  • DEL - Deletes one or more keys.
  • EXISTS - Determines whether one or more keys exist.
  • EXPIRE - Sets the expiration time of a key (in seconds).
  • EXPIREAT - Sets the expiration time of a key to a Unix timestamp.
  • KEYS - Returns all key names that match a pattern.
  • PERSIST - Removes the expiration time of a key.
  • PEXPIRE - Sets the expiration time of a key in ms.
  • PEXPIREAT - Sets the expiration time of a key to a Unix ms timestamp.
  • RANDOMKEY - Returns a random key name from the database.
  • RENAME - Renames a key and overwrites the destination.
  • RENAMENX - Renames a key only when the target key name doesn't exist.
  • SCAN - Iterates over the key names in the database.

Transactions

Redka supports the following transaction commands:

  • DISCARD - Discards a transaction.
  • EXEC - Executes all commands in a transaction.
  • MULTI - Starts a transaction.

Don't miss a new redka release

NewReleases is sending notifications on new releases.