Examples
Examples of the GET map function
In the following example, assume that the adapter is used in a GET function.
This command will execute the ZRANGE command for key "sortedset:1", specifying the start as 2 and stop as 5 (via the -DATA command). The -OPTIONS commands instructs the adapter to return the scores together with the elements, and to reverse the order of the data.
GET("REDIS", "-H redis-host -P 6379 -CMD ZRANGE -KEY sortedset:1 -DATA 2|5 -OPTIONS withscores|rev")Examples of the PUT map function
In the following example, assume that the adapter is used in a PUT function.
This command will set the key "mykey" to the value provided as the 3rd parameter of the PUT function.
PUT("REDIS", "-H redis-host -P 6379 -CMD SET -KEY mykey", "This is my data!")