Skip to content
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

fails mapping nullable type to optional column #40

Open
joprice opened this issue Jan 23, 2024 · 0 comments
Open

fails mapping nullable type to optional column #40

joprice opened this issue Jan 23, 2024 · 0 comments

Comments

@joprice
Copy link

joprice commented Jan 23, 2024

When using a custom decoder module with a nullable column such as @Settings?{settings} and querying the rows with get_many, I see the decoder getting called with an empty string instead of a null. I'm using the postgres driver against cockroachdb. Not sure what layer this could be going wrong at yet - the postgres driver providing a string instead of null or caqti parsing it wrong, so I wanted to verify that this the use case of custom types and optionals is supported by the ppx first. I see the following error when running a select statement:

Failed handling request Caqti_type.Reject("Line 1, bytes -1-0:\nUnexpected end of input")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant