10.class.mql 882 B

123456789101112131415161718192021222324252627282930
  1. typedef if not exists STRSTR = varchar ;
  2. typedef if not exists VENUM = enum {
  3. "0":["command", "命令"],
  4. "1":["shell", "shell脚本"],
  5. "2":["lua", "lua脚本"],
  6. "3":["task", "任务"],
  7. "4":["js", "js脚本"]
  8. } ;
  9. typedef if not exists FLIST = float[0..?] ;
  10. typedef if not exists FFLIST = FLIST ;
  11. typedef if not exists FFFLIST = FFLIST ;
  12. create class if not exists /test();
  13. create class if not exists /test/collect (
  14. v_varchar varchar,
  15. v_map map<STRSTR, STRSTR>,
  16. v_list list<STRSTR>,
  17. d_list double[2..3],
  18. f_list FFFLIST,
  19. i_list list<int>,
  20. v_set set<STRSTR>,
  21. v_type VENUM,
  22. indexes(v_varchar, v_map, v_list, v_set, v_type, d_list, f_list, i_list),
  23. keys(v_varchar)
  24. );