13alias.mql 713 B

123456789101112131415161718192021222324252627282930313233
  1. -- ============================================================
  2. -- Class Alias 测试
  3. -- ============================================================
  4. -- class 创建时使用了 nickname='syntax_test'
  5. -- 可以使用别名访问 class
  6. -- 1. 使用全名访问
  7. select s_name from /test/aaa/test_syntax where s_name='syntax_001'
  8. /**
  9. output()
  10. count(1)
  11. **/
  12. ;
  13. -- 2. 确保 class 存在后进行 alias 查询
  14. select s_name from /test/aaa/test_syntax where s_name='syntax_002'
  15. /**
  16. output()
  17. count(1)
  18. **/
  19. ;
  20. -- 3. update alias class
  21. update /test/aaa/test_syntax set s_Value=9999 where s_name='syntax_001'
  22. ;
  23. select s_Value from /test/aaa/test_syntax where s_name='syntax_001'
  24. /**
  25. output()
  26. match("s_Value","9999")
  27. **/
  28. ;