12valid.mql 993 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. -- ============================================================
  2. -- 跨命名空间操作验证测试
  3. -- ============================================================
  4. -- 1. 跨命名空间查询
  5. select * from /test/bbb/test_cross where x_name='cross_001'
  6. /**
  7. output()
  8. **/
  9. ;
  10. -- 2. 跨命名空间插入
  11. insert into /test/bbb/test_cross (x_name, x_value) values ('cross_from_aaa', 999)
  12. ;
  13. select * from /test/bbb/test_cross where x_name='cross_from_aaa'
  14. /**
  15. output()
  16. **/
  17. ;
  18. -- 3. 跨命名空间更新
  19. update /test/bbb/test_cross set x_value=555 where x_name='cross_001'
  20. ;
  21. select x_value from /test/bbb/test_cross where x_name='cross_001'
  22. /**
  23. output()
  24. **/
  25. ;
  26. -- 4. 跨命名空间删除
  27. delete from /test/ccc/test_cross_another
  28. /**
  29. onerror(continue,'not exist','not find','not found')
  30. **/
  31. ;
  32. drop class if exists /test/ccc/test_cross_another
  33. ;
  34. -- 5. 验证不存在的跨命名空间 class
  35. select * from /test/bbb/non_exist_cross
  36. /**
  37. onerror(continue,'not exist','not find','not found')
  38. **/
  39. ;