13bool.mql 865 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. -- ============================================================
  2. -- bool 类型搜索测试
  3. -- ============================================================
  4. -- 1. 搜索 bool=true
  5. select * from /test/aaa/test_search where s_bool=true
  6. /**
  7. output()
  8. match("search_int_001")
  9. match("search_int_003")
  10. match("search_int_004")
  11. match("search_string_001")
  12. match("search_string_003")
  13. **/
  14. ;
  15. -- 2. 搜索 bool=false
  16. select * from /test/aaa/test_search where s_bool=false
  17. /**
  18. output()
  19. match("search_int_002")
  20. match("search_int_005")
  21. match("search_string_002")
  22. **/
  23. ;
  24. -- 3. 复合条件:bool + int
  25. select * from /test/aaa/test_search where s_bool=true and s_int>10
  26. /**
  27. output()
  28. match("search_int_003")
  29. match("search_int_004")
  30. **/
  31. ;
  32. -- 4. 复合条件:bool + string
  33. select * from /test/aaa/test_search where s_bool=true and s_name='search_int_001'
  34. /**
  35. output()
  36. count(1)
  37. **/
  38. ;