1.mql 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. -- admin 查看指定信息
  2. SELECT
  3. *
  4. FROM
  5. /matrix/filesystem
  6. where
  7. fullname like '*new.png'
  8. /**
  9. output()
  10. count(3)
  11. match("fullname","/app/matrix/m3appstore/assets/graph/tools/mail_new.png")
  12. match("fullname","/assets/images/graph/tools/mail_new.png")
  13. match("fullname","/assets/images/product_screenshot/new.png")
  14. **/
  15. ;
  16. -- 用户信息
  17. select * from /matrix/ldap where username='user111'
  18. /**
  19. output()
  20. count(1)
  21. match("otype", "usr")
  22. match("grpset.0", "/产品测试部/aaa")
  23. match("parent", "/产品测试部")
  24. match("fullname", "/产品测试部/user111")
  25. **/
  26. ;
  27. -- 用户所属父级组织
  28. select * from /matrix/ldap where fullname='/产品测试部'
  29. /**
  30. output()
  31. count(1)
  32. match("grpset.0", "/产品测试部")
  33. match("fullname", "/产品测试部")
  34. **/
  35. ;
  36. -- 用户所属关联组信息 角色
  37. select * from /matrix/group where fullname='/产品测试部'
  38. /**
  39. output()
  40. count(1)
  41. match("sdata.~/matrix/entity/biz","id='biz:查账系统'")
  42. **/
  43. ;
  44. insert into /matrix/group (name,fullname,parent,member,isldap,sdata) values (?,?,?,?,?,?)
  45. /**
  46. params("aaa", "/产品测试部/aaa", "/产品测试部", ["U/产品测试部/user111"],false, {
  47. "/matrix/filesystem": "{\"should\":[{\"type\":\"wildcard\",\"field\":\"varchar_19\",\"value\":\"*new.png\"},{\"type\":\"phrase\",\"field\":\"varchar_19\",\"value\":\"new.png\"}],\"type\":\"boolean\"}",
  48. "~/matrix/filesystem": "fullname like '*new.png'"})
  49. **/
  50. ;
  51. -- 用户所属关联组信息 角色
  52. select * from /matrix/group where fullname='/产品测试部/aaa'
  53. /**
  54. output()
  55. count(1)
  56. match("sdata.~/matrix/filesystem","fullname like '*new.png'")
  57. **/
  58. ;
  59. -- 用户查看授权信息
  60. SELECT
  61. *
  62. FROM
  63. /matrix/filesystem
  64. /**
  65. qmeta({"user":"user111"})
  66. output()
  67. count(3)
  68. **/
  69. ;