radish/sorted_set

Types

pub type Score {
  Infinity
  Double(Float)
  NegativeInfinity
}

Constructors

  • Infinity
  • Double(Float)
  • NegativeInfinity

Functions

pub fn add_new(
  client: Subject(Message),
  key: String,
  members: List(#(String, Score)),
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn card(
  client: Subject(Message),
  key: String,
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn count(
  client: Subject(Message),
  key: String,
  min: Score,
  max: Score,
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn incr_by(
  client: Subject(Message),
  key: String,
  member: String,
  change_in_score: Score,
  timeout: Int,
) -> Result(Score, Error)

see here!

pub fn pop_max(
  client: Subject(Message),
  key: String,
  count: Int,
  timeout: Int,
) -> Result(List(#(String, Score)), Error)

see here!

pub fn pop_min(
  client: Subject(Message),
  key: String,
  count: Int,
  timeout: Int,
) -> Result(List(#(String, Score)), Error)

see here!

pub fn random_members(
  client: Subject(Message),
  key: String,
  count: Int,
  timeout: Int,
) -> Result(List(#(String, Score)), Error)

see here!

pub fn rank(
  client: Subject(Message),
  key: String,
  member: String,
  timeout: Int,
) -> Result(#(Int, Score), Error)

see here!

pub fn rem(
  client: Subject(Message),
  key: String,
  members: List(String),
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn reverse_rank(
  client: Subject(Message),
  key: String,
  member: String,
  timeout: Int,
) -> Result(#(Int, Score), Error)

see here!

pub fn scan(
  client: Subject(Message),
  key: String,
  cursor: Int,
  count: Int,
  timeout: Int,
) -> Result(#(List(#(String, Score)), Int), Error)

see here!

pub fn scan_pattern(
  client: Subject(Message),
  key: String,
  cursor: Int,
  pattern: String,
  count: Int,
  timeout: Int,
) -> Result(#(List(#(String, Score)), Int), Error)

see here!

pub fn score(
  client: Subject(Message),
  key: String,
  member: String,
  timeout: Int,
) -> Result(Score, Error)

see here!

pub fn update(
  client: Subject(Message),
  key: String,
  members: List(#(String, Score)),
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn update_only_higher_scores(
  client: Subject(Message),
  key: String,
  members: List(#(String, Score)),
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn update_only_lower_scores(
  client: Subject(Message),
  key: String,
  members: List(#(String, Score)),
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn upsert(
  client: Subject(Message),
  key: String,
  members: List(#(String, Score)),
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn upsert_only_higher_scores(
  client: Subject(Message),
  key: String,
  members: List(#(String, Score)),
  timeout: Int,
) -> Result(Int, Error)

see here!

pub fn upsert_only_lower_scores(
  client: Subject(Message),
  key: String,
  members: List(#(String, Score)),
  timeout: Int,
) -> Result(Int, Error)

see here!

Search Document