13alias.mql 671 B

123456789101112131415161718192021222324252627282930
  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. **/
  11. ;
  12. -- 2. 确保 class 存在后进行 alias 查询
  13. select s_name from /test/aaa/test_syntax where s_name='syntax_002'
  14. /**
  15. output()
  16. **/
  17. ;
  18. -- 3. update alias class
  19. update /test/aaa/test_syntax set s_Value=9999 where s_name='syntax_001'
  20. ;
  21. select s_Value from /test/aaa/test_syntax where s_name='syntax_001'
  22. /**
  23. output()
  24. **/
  25. ;