88_drop.mql 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. delete 性能备份AaB from /test/性能AaB_CC with version
  2. /**
  3. onerror(continue,`not exist`,`not find`,`not found`)
  4. **/
  5. ;
  6. delete 性能AaB from /test/性能AaB_CC with version
  7. /**
  8. onerror(continue,`not exist`,`not find`,`not found`)
  9. **/
  10. ;
  11. delete from /test/性能AaB_CC with version
  12. /**
  13. onerror(continue,`not exist`,`not find`,`not found`)
  14. **/
  15. ;
  16. drop class if exists /test/性能AaB_CC;
  17. create class if not exists /test/性能AaB_CC (
  18. 主机AaB varchar,
  19. v_date date,
  20. v_timestamp timestamp,
  21. 性能备份AaB bucket {
  22. "dict": true,
  23. "slot": 5,
  24. "ttl": 2,
  25. "type": "promdb",
  26. "version": 1
  27. },
  28. noindex varchar,
  29. 性能AaB bucket {
  30. "dict": true,
  31. "slot": 5,
  32. "ttl": 2,
  33. "type": "promdb",
  34. "version": 1
  35. },
  36. keys(主机AaB),
  37. indexes(主机AaB )
  38. )with core=cassandra, autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB_CC'
  39. ;
  40. insert into /test/性能AaB_CC (id,主机AaB,v_date,v_timestamp) values ('性能AaB_CC:test',"服务器1","2026-04-02","2026-04-02 15:55:55");
  41. insert into /test/性能AaB_CC (id,主机AaB,v_date,v_timestamp) values ('性能AaB_CC:test2',"服务器2","1754-08-31","1754-08-31 15:55:55");
  42. create ("性能AaB_CC:test")-[:connect]->("性能AaB_CC:test2")
  43. /**
  44. output()
  45. **/
  46. ;
  47. select count(*) from /test/性能AaB_CC where 主机AaB='服务器1'
  48. /**
  49. output()
  50. count(1)
  51. **/
  52. ;
  53. cql: select * from field where namespace='test' and name in ('主机aab','noindex')
  54. /**
  55. match("name", "主机aab", "isindex", 1)
  56. match("name", "noindex", "isindex", 0)
  57. **/
  58. ;
  59. select * from /test/性能AaB_CC where v_date between 1774972800000 and 1776182400000 limit 10
  60. /**
  61. output()
  62. count(1)
  63. **/
  64. ;
  65. select "hello".id from /test/性能AaB_CC "hello" where v_date between 1774972800000 and 1776182400000 order by "hello".v_date limit 10
  66. /**
  67. output()
  68. count(1)
  69. **/
  70. ;
  71. select * from /test/性能AaB_CC where v_timestamp between 1774972800000 and 1776182400000 limit 10
  72. /**
  73. output()
  74. count(1)
  75. **/
  76. ;
  77. alter class /test/性能AaB_CC with core=cacheonly
  78. ;
  79. select * from /test/性能AaB_CC
  80. /**
  81. output()
  82. count(0)
  83. **/
  84. ;