Esempio n. 1
0
        public async void Del()
        {
            var add = await DB.Set("test", "henryfan");

            Write(add);
            var del = await DB.Del("test");

            Write(del);
        }
Esempio n. 2
0
        public async void SCARD()
        {
            await DB.Flushall();

            var sets  = GetSets();
            var count = await sets.SAdd("tool", "pc", "printer", "phone");

            var len = await sets.SCard("tool");

            Assert.Equal(3, len);
            await DB.Del("tool");

            len = await sets.SCard("tool");

            Assert.Equal(0, len);
        }
Esempio n. 3
0
        public async void ZAdd()
        {
            await DB.Del("seq2");

            var sequeue = DB.CreateSequence("seq2");
            var count   = await sequeue.ZAdd((1, Guid.NewGuid().ToString("N")), (2, Guid.NewGuid().ToString("N")));

            Assert.Equal <long>(count, 2);
            Write(count);
        }