99.x.mql 936 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. update /matrix/group set _group = ? where name in ?
  2. /**
  3. params({}, ["admin"])
  4. **/
  5. ;
  6. select _group from /matrix/group where name = 'admin' refresh
  7. /**
  8. output()
  9. **/
  10. ;
  11. update /matrix/group set _group = _group + ? where name in ?
  12. /**
  13. params({"add": ["网络部"], "delete": ["网络部"], "edit": ["网络部"], "list": ["网络部"]}, ["admin"])
  14. **/
  15. ;
  16. update /matrix/group set _group = _group + ? where name in ?
  17. /**
  18. params({"add": ["市场部"]}, ["admin"])
  19. **/
  20. ;
  21. select _group from /matrix/group where name = 'admin' refresh
  22. /**
  23. output()
  24. equal(0,_group.add.len,2)
  25. **/
  26. ;
  27. select distinct class from /matrix/ldap
  28. /**
  29. output()
  30. **/
  31. ;
  32. select * from /matrix/ldap
  33. /**
  34. output()
  35. metainfo()
  36. matchcount(username,admin,1)
  37. matchcount(username,/,1)
  38. equal(1,username,/)
  39. equal(-1,columns./matrix/ldap.0.name,class)
  40. **/
  41. ;
  42. select distinct username,id from /matrix/ldap
  43. /**
  44. output()
  45. **/
  46. ;