Add basic support for GRANT and REVOKE#365
Conversation
| /// Optional keyword from the spec, ignored in practice | ||
| with_privileges_keyword: bool, |
There was a problem hiding this comment.
Maybe worth removing it from the struct then?
There was a problem hiding this comment.
@alamb I erred on the side of losslessness here, but I wasn't sure to what degree that's a goal.
I guess there are already many cases where an implied default becomes explicit when parsed, and would then produce different output after a roundtrip if the input had omitted the default (eg. cascade in Statement::Drop).
If you think it would be cleaner I'm happy to PR removing this.
There was a problem hiding this comment.
If this field is needed to survive the round trip I think keeping it makes sense.
Pull Request Test Coverage Report for Build 1452484256Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
|
@blx I merged your code to master and fixed some clippy warnings |
Hello 👋
Preliminary PR here for basic
GRANTandREVOKEsupport. I'm not sure if permissions statements like GRANT are in scope here; if not please feel free to close!My personal experience is mostly postgres-flavored but I've tried to stick to the spec here. Note, this only addresses granting privileges regarding objects (like tables); there is also a
GRANT <role_name> TO <role_specification>for adding users to groups, which is not considered here.This also doesn't yet consider
column permissions (other object types likeGRANT SELECT ON a (id, created) ...), norDATABASEorDOMAIN.Please let me know if there's interest in this, thanks!