| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- -- ============================================================
- -- int 类型搜索测试
- -- ============================================================
- -- 1. 等值搜索
- select * from /test/aaa/test_search where s_int=10
- /**
- output()
- count(1)
- match("s_name","search_int_001")
- **/
- ;
- -- 2. 大于搜索
- select * from /test/aaa/test_search where s_int>20
- /**
- output()
- match("search_int_003")
- match("search_int_004")
- match("search_int_005")
- **/
- ;
- -- 3. 小于搜索
- select * from /test/aaa/test_search where s_int<20
- /**
- output()
- match("search_int_001")
- **/
- ;
- -- 4. 大于等于搜索
- select * from /test/aaa/test_search where s_int>=50
- /**
- output()
- match("search_int_004")
- match("search_int_005")
- **/
- ;
- -- 5. 不等于搜索
- select * from /test/aaa/test_search where s_int!=10
- /**
- output()
- **/
- ;
- -- 6. 搜索不存在的值
- select * from /test/aaa/test_search where s_int=99999
- /**
- output()
- count(0)
- **/
- ;
- -- 7. 搜索负数 (插入测试数据)
- insert into /test/aaa/test_search (s_name, s_text, s_int) values ('search_neg_001', 'negative int test', -100)
- ;
- select * from /test/aaa/test_search where s_int=-100
- /**
- output()
- count(1)
- **/
- ;
- -- 8. 搜索零值
- select * from /test/aaa/test_search where s_int=0
- /**
- output()
- count(0)
- **/
- ;
|