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

feat: Add sample of new_with_encoders and infer_encoder #32

Merged

Conversation

tomasfarias
Copy link
Contributor

@tomasfarias tomasfarias commented Jan 19, 2024

Related issue: #31

Adds a sample to Python README showcasing new_with_encoders and infer_encoder. The sample is based on my current work on exporting Arrow data to PostgreSQL.

Tested the script locally with a PostgreSQL database running on localhost:5432, and the final table looks like:

postgres=# select * from id_properties;
 id |          properties          
----+------------------------------
  1 | {"age": 33, "name": "alice"}
  2 | {"age": 24, "name": "bob"}
  3 | {}
  4 | null
psothog=# \d id_properties
             Table "public.id_properties"
   Column   |  Type  | Collation | Nullable | Default 
------------+--------+-----------+----------+---------
 id         | bigint |           |          | 
 properties | jsonb  |           |          |

Besides this sample, I'd be happy to contribute more documentation. Are there any plans to host documentation pages somewhere? E.g. GitHub pages or readthedocs? I'd be happy to contribute the Sphinx boilerplate to get that going (at least for the Python API docs, not sure how to mix Rust and Python docs).

Thank you!

@adriangb
Copy link
Owner

Thanks so much for the contribution! I prefer mkdocs hosted on github pages, I can set it up at some point, but for now I'd say let's keep it in a README.md until that clearly is not enough.

@adriangb adriangb enabled auto-merge (squash) January 19, 2024 23:24
@adriangb adriangb merged commit 8cc4d6e into adriangb:main Jan 19, 2024
30 checks passed
livinlefevreloca pushed a commit to livinlefevreloca/pgpq that referenced this pull request Apr 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants