3 releases (stable)
1.0.1 | Feb 21, 2024 |
---|---|
1.0.0 | Feb 19, 2024 |
0.1.0 | Feb 14, 2024 |
#1758 in Encoding
104 downloads per month
20KB
523 lines
rs-row2pgcsv
Nested array -> PostgreSQL CSV
lib.rs
:
Simple array-to-string serializer for PostgreSQL COPY Command.
Use external crate(e.g, csv) to serialize a row as a CSV row and import to PostgreSQL.
What this crate can:
- Serialize an array of numbers to a string(e.g,
[1,2] => {1,2}
) - Serialize a nested array of numbers to a string(e.g,
[[1,2],[3,4]] => {{1,2},{3,4}}
)
What this crate can't(don't):
- Serialize an array of strings to a string
- Serialize a nested array of strings to a string
- Convert a string to a string which can be used for PostgreSQL COPY Command
Dependencies
~0.3–1MB
~21K SLoC