-
Notifications
You must be signed in to change notification settings - Fork 115
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
add showSqlTypeWithSchema for types in a schema #589
Conversation
stevemao
commented
Apr 8, 2024
- similar to enumMapperWithSchema
- enums needs an instance of IsSqlType if used with an array
- enums can have a schema
- similar to enumMapperWithSchema - enums needs an instance of IsSqlType if used with an array - enums can have a schema
If you want a schema I don't understand why you can't just do |
I can, but other APIs such as |
I see. Then in that case I think showSqlTypeWithSchema :: (String, String) -> String
showSqlTypeWithSchema (schema, type_) =
render (doubleQuotes (text schema) <> text "." <> doubleQuotes (text type_)) that you use like
Making it a class method means that all instances have to implement it, which is not what we want because not all type names have a schema. |
Happy with a function to make it simple. But I have some questions
Not really? the instance can choose to implement either method |
But what if an instance choose not to implement it but then a user calls it on that instance? Run time crash, presumably. |
Ok, definitely not ideal even though it's an internal module |
Thanks, I tweaked this and merged it in f012b27 |