88_local.mql 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. delete 性能备份AaB from /test/性能AaB_Local with version
  2. /**
  3. onerror(continue,`not exist`,`not find`,`not found`)
  4. **/
  5. ;
  6. delete 性能AaB from /test/性能AaB_Local with version
  7. /**
  8. onerror(continue,`not exist`,`not find`,`not found`)
  9. **/
  10. ;
  11. delete from /test/性能AaB_Local with version
  12. /**
  13. onerror(continue,`not exist`,`not find`,`not found`)
  14. **/
  15. ;
  16. drop class if exists /test/性能AaB_Local;
  17. create class if not exists /test/性能AaB_Local (
  18. 主机AaB varchar,
  19. 性能备份AaB bucket {
  20. "dict": true,
  21. "slot": 5,
  22. "ttl": 2,
  23. "type": "promdb",
  24. "version": 1
  25. },
  26. noindex varchar,
  27. 性能AaB bucket {
  28. "dict": true,
  29. "slot": 5,
  30. "ttl": 2,
  31. "type": "promdb",
  32. "version": 1
  33. },
  34. keys(主机AaB),
  35. indexes(主机AaB )
  36. )with core=local, autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB_Local'
  37. ;
  38. insert into /test/性能AaB_Local (id,主机AaB) values ('性能AaB:test',"服务器1");
  39. select count(*) from /test/性能AaB_Local where 主机AaB='服务器1'
  40. /**
  41. output()
  42. count(1)
  43. **/
  44. ;
  45. cql: select * from field where namespace='test' and name in ('主机aab','noindex')
  46. /**
  47. match("name", "主机aab", "isindex", 1)
  48. match("name", "noindex", "isindex", 0)
  49. **/
  50. ;