gledis

Types

pub external type Argument
pub external type Client

Covers commonly used Redis commands with an escape hatch for custom commands or less used ones

pub type Query {
  Keys(pattern: String)
  Get(key: String)
  Set(key: String, value: Argument)
  Del(key: String)
  Exists(key: String)
  RandomKey
  Custom(command: String, args: List(Argument))
}

Constructors

  • Keys(pattern: String)
  • Get(key: String)
  • Set(key: String, value: Argument)
  • Del(key: String)
  • Exists(key: String)
  • RandomKey
  • Custom(command: String, args: List(Argument))

    This can causes crashes and should be avoided at all costs

Functions

pub external fn bool(Bool) -> Argument
pub external fn bytea(BitString) -> Argument
pub external fn close(client: Client) -> Nil
pub external fn connect() -> Client
pub external fn dynamic(Dynamic) -> Argument
pub external fn float(Float) -> Argument
pub external fn int(Int) -> Argument
pub external fn null() -> Argument
pub fn query(client: Client, query: Query) -> Result(a, String)
pub external fn string(String) -> Argument
Search Document