Closed Aflynn50 closed 5 months ago
Note that this PR is affected by the bug fixed in #98.
Now that we are changing the pipeline we should hold this PR. We would not be needing typeLocation
, only to embed the raw string in the tree replacing PreparedExpr.
Add information to errors in
query.go
about the expression in the query that the error pertains to. Extra information is also added to the error that reports duplicate type members in the query, it now includes the expressions in which the two instances occur.In the
PreparedExpr
a list of typeMembers was used to store the query input and outputs . This is replaced by a list oftypeLocations
. ThetypeLocation
struct contains thetypeMember
and the raw string.typeMember
structs are reused across statements so it would be strange to include information specific to the statement inside them. ThetypeLocation
struct can also be used in the future to retain other contextual information about where thetypeMember
occurs in the query.