10class.mql 841 B

12345678910111213141516171819202122232425262728293031323334
  1. delete from /test/测试 with version
  2. /**
  3. onerror(continue,`not exist`,`not find`,`not found`)
  4. **/
  5. ;
  6. drop class if exists /test/测试/
  7. ;
  8. create class if not exists /test/测试 (
  9. 字符串 STRSTR,
  10. 文本 text,
  11. 文字 text,
  12. 整数 int,
  13. 大整数 bigint,
  14. 双浮点 double,
  15. 自定义类型 DOUDOU,
  16. 浮点 float,
  17. 布尔 bool,
  18. 数据块 blob,
  19. indexes(字符串, 文本, 文字, 整数, 大整数, 自定义类型, 浮点, 双浮点, 布尔),
  20. keys(字符串, 文本)
  21. ) with core=cassandraonly;
  22. create class if not exists /test/测试/子类 () with autosearch=true , version=false , key=manu, nickname = '测试子类' ;
  23. --must have nickname for private field
  24. alter class /test/测试 with nickname='测试' ;
  25. --taget define in tools, its string
  26. alter class /test/测试 add column 目标 int ;