Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Go:
database
local source models #17905base: main
Are you sure you want to change the base?
Go:
database
local source models #17905Changes from all commits
5dac5a4
bce95a0
d806d93
0e02ce0
4458fc3
686d994
9628dca
f02aea7
3c00954
e2413e6
d9911f7
72f1d2f
1882809
e1168cb
408e5e6
c2f6802
14923dc
5cef61e
6a98936
0c25765
e8b7975
e2c66d2
a963b4b
6754914
bc51b55
360223d
de2692a
76f7578
4ef3d31
d29ccb0
15f5055
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 copy these for
Core
, and maybeTX
too.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.
Also want models for methods Scan, ScanList, Select, Struct and Structs on Model.
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.
Also, most of these methods on Model return a Model, which we aren't modelling at the moment. It would mean a huge number of models though. But without that, the examples they give, like
db.Model("user").Where("id", 1).Scan(&user)
, won't get the taint tracked through it properly. I'm not sure what to do here, to be honest.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.
Also needs models for
QueryContextWith
,QueryWith
,QueryRowContextWith
,QueryRowWith
,Row.Scan
(it seems to override the inheritedScan
method from embeddingRowScanner
),*Builder.Query
(different method signature toQueryRower.Query
, unfortunately),*Builder.QueryContext
,*Builder.QueryRow
,*Builder.QueryRowContext
,*Builder.Scan
,*Builder.ScanContext
. (Do we care about all the Builders? Delete? I guess safest to model them all...)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.
If I remember correctly, this model won't work because dataflow out of a variadic parameter doesn't work currently. It can be modeled in QL using
TaintTracking::FunctionModel
.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.
The last example here shows that we need to model
Exec
as well (in QL). And this part of the docs.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.
These docs make me think we need source models for
DB.Query*
and summary models forDB.ScanRow
andDB.ScanRows
.Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.