atossa

command module
v0.0.0-...-35a0e22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

Build Status Coverage Status codebeat badge Go Report Card Gitter

Atossa

Fast, polyglot database

Supported redis commands

Artimis doesn't implement all redis commandset. Instead, it supports the core concepts that will help you to build any type of data models on top of it.

✅ Not implemented yet
➕ Partially implemented
✔ Implemented

Connection

ECHO message: Echo the given string
PING [message]: Ping the server
QUIT: Close the connection

Administrative

COMMAND: Get array of supported commandset with details
COMMAND COUNT: Get total number of supported commands
COMMAND INFO command-name [command-name ...]: Get array of specific commands
CONFIG: Returns current configuration of the server
DBSIZE: Returns the number of keys in the selected database
INFO: Get information and statistics about the server
LOLWUT: WUT?!
SHUTDOWN: Shut down the server
TIME: Returns the current server time

Keys

DEL key [key ...]: Delete a key
EXISTS key [key ...]: Determine if a key exists
EXPIRE key seconds: Set a key's TTL in seconds
EXPIREAT key timestamp: Set the expiration for a key as a UNIX timestamp
KEYS pattern
PEXPIRE key milliseconds: Set a key's TTL in milliseconds
PEXPIREAT key milliseconds-timestamp: Set the expiration for a keys as a UNIX timestamp specified in milliseconds
PTTL key: Get the TTL for a key in milliseconds
RANDOMKEY: Return a random key from the keyspace
RENAME: Rename a key
RENAMENX key newkey: Rename a key, only if the new key does not exists
SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]: Sort the elements in a list, set or sorted set
TTL key: Get the time to live for a key
TYPE key: Determine the type stored at the key

Strings

APPEND key value: Append a value to a key
DECR key: Decrement the integer value of a key by one
DECRBY key decrement: Decrement the integer value of a key by the given number
GET key: Get the value of a key
GETRANGE key start end: Get a substring of the string stored at a key
GETSET key value: Set the string value of a key and return its old value
INCR key: Increment the integer value of a key by one
INCRBY key increment: Increment the integer value of key by the given amount
INCRBYFLOAT key increment: Increment the float value of a key by the given amount
MGET key [key ...]: Get the values of all the given keys
MSET key value [key value ...]: Set multiple keys to multiple values
MSETNX key value [key value ...]: Set multiple keys to multiple values, only if none of the keys exist
PSETEX key milliseconds value: Set the value and expiration in milliseconds of a key
SET key value [EX seconds|PX milliseconds] [NX|XX] [KEEPTTL]: Set the string value of a key
SETEX key value: Set the value and expiration of a key
SETNX key value: Set the value of a key, only if a key does not exist
SETRANGE key offset value: Overwrite part of a string at key starting at the specified offset
STRLEN key: Get the length of the value stored in a key

Lists

BLPOP key [key ...] timeout: Remove and get the first element in a list, or block until one is available
BRPOP key [key ...] timeout: Remove and get the last element in a list, or block until one is available
BRPOPLPUSH source destination timeout: Pop an element from a list, push it to another list and return it; or block until one is available
LINDEX key index: Get an element from a list by its index
LINSERT key BEFORE|AFTER pivot element: Insert an element before or after another element in a list
LLEN key: Get the length of a list
LPOP key: Remove and get the first element in a list
LPUSH key element [element ...]: Prepend one or multiple elements to a list
LPUSHX key element [element ...]: Prepend an element to a list, only if the list exists
LRANGE key start stop: Get a range of elements from a list
LREM key count element: Remove elements from a list
LSET key index element: Set the value of an element in a list by its index
LTRIM key start stop: Trim a list to the specified range
RPOP key: Remove and get the last element in a list
RPOPLPUSH source destination: Pop an element from a list, push it to another list and return it
RPUSH key element [element ...]: Append one or multiple elements to a list
RPUSHX key element [element ...]: Append an element to a list, only if the list exists

Incompatibility Notes

There is cases that this server behaviour is not compatible with Redis. You can find them listed below:

  • Key must not be an empty string, if an empty key is provided server will return an ERR NILKEY Key is nil

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL