content_image/694997.jpg
## Range Queries 

For range queries, the daemon_memcached  plugin supports the following comparison operators: < , > , <= , >= . An operator must be preceded by an @  symbol. When a range query finds multiple matching key-value pairs, results are returned in a key-value pair sequence. 

The following examples demonstrate range query support. The examples use the test.city  table described in Creating a New Table and Column Mapping. 

mysql> SELECT * FROM test.city; 

<img src='content_image/694997.jpg'>

Open a telnet session: 

telnet 127.0.0.1 11211 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is ’^]’. 

To get all values greater than B , enter get @>B : 

get @>B VALUE C 0 21 CHENNAI|TAMIL NADU|IN VALUE D 0 14 DELHI|DELHI|IN VALUE H 0 22 HYDERABAD|TELANGANA|IN VALUE M 0 21 MUMBAI|MAHARASHTRA|IN END 

To get all values less than M , enter get @<M : 

get @<M VALUE B 0 22 BANGALORE|BANGALORE|IN VALUE C 0 21 CHENNAI|TAMIL NADU|IN VALUE D 0 14 DELHI|DELHI|IN VALUE H 0 22 HYDERABAD|TELANGANA|IN END 

To get all values less than and including M , enter get @<=M : 

get @<=M VALUE B 0 22 BANGALORE|BANGALORE|IN VALUE C 0 21 CHENNAI|TAMIL NADU|IN VALUE D 0 14 DELHI|DELHI|IN VALUE H 0 22 HYDERABAD|TELANGANA|IN VALUE M 0 21 

