Typos in web page example html (not in repo itself)
Closed this issue · 3 comments
Laeeth commented
See modified version below, which seems to work.
import tinyredis.redis;
import std.stdio;
void main()
{
auto redis = new Redis("localhost", 6379);
redis.send("SET name Adil");
writeln("The name's ", redis.send("GET name")); //The name's Adil
//Add data to a set and read it
redis.send("SADD", "fruits", ["apples", "oranges", "bananas"]);
auto fruits = redis.send("SMEMBERS", "fruits");
foreach(k, fruit; fruits)
writeln(k, ") ", fruit);
//Cast your results
//writefln("There are %s fruits", redis.send!(uint)("SCARD", fruits));
//intelligent opCasts for responses!
if(redis.send("EXISTS", fruits))
writefln("Fruits have been defined!");
//Lua scripting is supported! ..
Response r1 = redis.eval("return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}", ["key1", "key2"], ["first", "second"]);
writeln(r1); // [key1, key2, first, second]
// .. And pipelining
redis.pipeline(["SET person1:name Adil", "SET person1:name Batman", "SET person1:name Robin"]);
//.. And transactions
redis.transaction(["SET ctr 0", "INCR ctr", "INCR ctr"]);
}
Laeeth commented
Thank you for making the library. I had written a nanomsg binding/mini-wrapper, but really it seems tinyredis is better for my purpose.
adilbaig commented
I'm glad to hear that. Feel free to suggest any improvements. And ofcourse, do keep the bug reports coming :)