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

Support Struct columns #5

Open
adriangb opened this issue Feb 28, 2023 · 2 comments
Open

Support Struct columns #5

adriangb opened this issue Feb 28, 2023 · 2 comments

Comments

@adriangb
Copy link
Owner

What should we do with these? Custom types in Postgres are messy because we need to know (1) the name to emit DDL and (2) the OIDs of the inner types, which is messy when dealing with nested types like arrays. Maybe we should copy these over as JSONB?

@adriangb
Copy link
Owner Author

adriangb commented Mar 9, 2023

So I think the thing to do here is ask the user to get the OIDs for us:

needed_metadata = analyze_metadata(schema)

metada = await some_util_funcion_per_db_driver(needed_metada, some_connection)

encoder = Encoder(schema, metadata)

The key is that the rust package remain sans-io and with no dependency on a particular database driver (which would make it much harder to be language agnostic).

@adriangb adriangb mentioned this issue Mar 19, 2023
@adriangb
Copy link
Owner Author

adriangb commented May 8, 2023

Making progress here. We can now specify the encoder to use for each column. We just need the utility function.

@adriangb adriangb added the good first issue Good for newcomers label May 8, 2023
@adriangb adriangb removed the good first issue Good for newcomers label Jun 15, 2023
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