10class.mql 956 B

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