| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- select _group from /matrix/group
- /**
- output()
- **/
- ;
- update /matrix/group set _group = ? where name in ?
- /**
- params(nil, ["admin"])
- **/
- ;
- select _group from /matrix/group where name = 'admin' refresh
- /**
- output()
- matchcount(`_group`, nil, 1)
- **/
- ;
- update /matrix/group set _group = ? where name in ?
- /**
- params({}, ["admin"])
- **/
- ;
- -- cassandra update map field value {} == null
- select _group from /matrix/group where name = 'admin' refresh
- /**
- output()
- matchcount(`_group`, nil, 1)
- **/
- ;
- update /matrix/group set _group = _group + ? where name in ?
- /**
- params({"add": ["网络部"], "delete": ["网络部"], "edit": ["网络部"], "list": ["网络部"]}, ["admin"])
- **/
- ;
- select _group from /matrix/group where name = 'admin' refresh
- /**
- output()
- matchcount(`_group.delete.0`, "网络部", 1)
- **/
- ;
- update /matrix/group set _group = _group + ? where name in ?
- /**
- params({"add": ["市场部"]}, ["admin"])
- **/
- ;
- select _group from /matrix/group where name = 'admin' refresh
- /**
- output()
- matchcount(`_group.add.len`, 2, 1)
- **/
- ;
|