11create.mql 626 B

12345678910111213141516171819202122232425262728293031
  1. -- ============================================================
  2. -- 跨命名空间 class 创建测试
  3. -- ============================================================
  4. -- 1. 创建跨命名空间 class
  5. create class if not exists /test/bbb/test_cross_create (
  6. name varchar,
  7. val int,
  8. keys(name)
  9. )
  10. ;
  11. -- 2. 在当前 namespace 跨 namespace 创建
  12. create class if not exists /test/ccc/test_cross_another (
  13. name varchar,
  14. data text,
  15. keys(name)
  16. )
  17. /**
  18. onerror(continue,'Not Found Parent Class')
  19. **/
  20. ;
  21. -- 3. 验证跨 namespace class
  22. select count(*) from /test/bbb/test_cross
  23. /**
  24. output()
  25. **/
  26. ;