10class.mql 979 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. delete from /test/basic with version
  2. /**
  3. onerror(continue,`not exist`,`not find`,`not found`)
  4. **/
  5. ;
  6. drop class if exists /test/basic/
  7. ;
  8. create class if not exists /test/basic (
  9. v_varchar STRSTR,
  10. v_text text,
  11. v_string text,
  12. v_int int,
  13. v_bigint bigint,
  14. v_smalldouble double,
  15. v_double DOUDOU,
  16. v_float float,
  17. v_bool bool,
  18. v_blob blob,
  19. indexes(v_varchar, v_text, v_string, v_int, v_bigint, v_double, v_float, v_smalldouble, v_bool),
  20. keys(v_varchar, v_text)
  21. ) with core=cassandraonly;
  22. create class if not exists /test/basic/mxfield () with autosearch=true , version=false , key=manu, nickname = 'mxfield' ;
  23. --must have nickname for private field
  24. alter class /test/basic with nickname='basic' ;
  25. --taget define in tools, its string
  26. alter class /test/basic add column target int ;
  27. --test hello:version, hello:policy field
  28. create class if not exists /matrix/system/test (
  29. version int,
  30. policy int,
  31. keys(name)
  32. )with nickname='hello';