-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Adds support for prepared query templates. #1764
Conversation
2c46c34
to
3f33f70
Compare
e29604f
to
b7f4037
Compare
27eebc5
to
4ec826d
Compare
Here are the benchmarks with the latest version of everything:
The small render should be pretty typical of normal users, and 40 us seems pretty reasonable. |
|
||
var ret structs.PreparedQueries | ||
for wrapped := queries.Next(); wrapped != nil; wrapped = queries.Next() { | ||
ret = append(ret, toPreparedQuery(wrapped)) |
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.
Any reason to not just wrapped.(*queryWrapper).PreparedQuery
? You already handle the nil check before we get here it looks like.
1548588
to
ddf703d
Compare
This removes some unused dependencies that I know we plan to re-add later, but this makes for a clean `godep save` for now.
…as well as improved iradix tree.
37bd28f
to
1cad6b9
Compare
parse := func(path string, v reflect.Value) error { | ||
tree, err := hil.Parse(v.String()) | ||
if err != nil { | ||
return fmt.Errorf("Bad format '%s' in Service%s: %s", v.String(), path, err) |
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.
Does this render correctly without a space after Service
?
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.
Yeah - this is a little cheesy but all paths have a leading "." so this looks like Service.Foo
.
Code LGTM! 👍 |
Adds support for prepared query templates.
This is ready for review.
/cc @ryanuber and @sean-