Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (25 sloc) 620 Bytes

Set operations for TC

Lua extension with set operations for Tokyo Tyrant edit

Starting server

> ttserver -ext set.lua test.tch

Executing from command line

> tcrmgr ext localhost set_append keyname 1
  1
> tcrmgr ext localhost set_append keyname 3
  3
> tcrmgr ext localhost set_append keyname 5
  5
> tcrmgr ext localhost set_append keyname2 5
  5
> tcrmgr ext localhost set_length keyname
  3
> tcrmgr ext localhost set_get keyname
  1
  3
  5

Executing via Ruby

> ruby sets.rb
> bar
> nil
> bar

Source: github.com/uggedal/tokyo-tyrant-sets/tree/master