diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-05-17 08:33:49 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-05-17 08:34:16 +1000 |
commit | 34d0e14824c2491002fe5763c11b66c196a0f109 (patch) | |
tree | 4ce1cb5a2d166414be9c195b139dca2a67ae8246 /examples | |
parent | 7f75234e8e68394271ecb8b56a0a117a1d6066a7 (diff) | |
download | jimtcl-34d0e14824c2491002fe5763c11b66c196a0f109.zip jimtcl-34d0e14824c2491002fe5763c11b66c196a0f109.tar.gz jimtcl-34d0e14824c2491002fe5763c11b66c196a0f109.tar.bz2 |
jim-redis: Add support for -type
For retrieving type information of return values.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/redis.tcl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/redis.tcl b/examples/redis.tcl index 3044ab8..aa3d246 100644 --- a/examples/redis.tcl +++ b/examples/redis.tcl @@ -27,6 +27,17 @@ $r HMSET env {*}$env set result [$r HGET env testing] puts "HGET: testing=$result" +# Now the same with -type +set result [$r -type HGET env testing] +puts "HGET (-type): testing=$result" + +# Now a missing value with -type +set result [$r -type HGET env doesnotexist] +puts "HGET (-type): doesnotexist=$result" + +set result [$r -type HGETALL env] +puts "HGETALL (-type): $result" + set size [$r HLEN env] puts "Size of env is $size" |