You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unable to get a arg to cast to the correct type in the generated go code. I have CAST(sqlc.arg(sortBy) AS char) in my code and I could expect then that the sortBy arg would be typed as a string or sql.NullString but instead it is interface{}
select*from user_master where roleId =2and userStatus =2and is_user_deleted =0and userId <> coalesce(sqlc.arg(activeUser), 0) and active =1ORDER BY
CASE CAST(sqlc.arg(sortBy) ASchar)
WHEN 'name' THEN concat('', firstName, lastName)
WHEN 'latest' THEN -createdOn
ELSE createdOn
END;
Version
1.27.0
What happened?
unable to get a arg to cast to the correct type in the generated go code. I have
CAST(sqlc.arg(sortBy) AS char)
in my code and I could expect then that thesortBy
arg would be typed as astring
or sql.NullString
but instead it isinterface{}
Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/68970c6306298bc080bde9782d36c40c18e6f54010c18a41aa1271a9b34eab06
What operating system are you using?
macOS
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: