Enforce struct on return type #1803
Unanswered
krishna15898
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Table1
has columns (col1
,col2
)Table2
has columns (col3
)Sql queries -
These two queries generate functions with return types
[]Table1
with a struct automatically generated
But if we have two queries
and
We get two different return types
[]GetRowsFromJoinCriteria1Row
and[]GetRowsFromJoinCriteria2Row
respectively. Whereeven though they are similar structs (by the fields present in them), they are names different.
Question: Is there a way to enforce that the two structs generated for the latter case be the same? Or more generally, can we enforce the return type struct from the generated function?
Beta Was this translation helpful? Give feedback.
All reactions