88.mql 1.3 KB

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