-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PXD-2730: client permission #53
Conversation
arborist/auth.go
Outdated
func _authorize(stmts *CachedStmts, exp Expression, args []string, | ||
query string, qargs ...interface{}) (bool, error) { | ||
// run authorization query | ||
rows, err := stmts.Query(query, qargs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should be able to just do something like this:
var results []bool
err = db.Select(&results, query)
and be able to skip iterating through rows.Next()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or I guess probably pq.BoolArray
or something)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh here we actually needed a map of argName: value
, so iteration is hardly avoidable I think. But I added the Select
to the cached statements anyway ;)
d750a00
to
55545ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It looks like some files could use a
go fmt
run
@rudyardrichter I'm merging this to |
New Features