You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2023. It is now read-only.
Previously, we weren’t parsing and serialising results for [postgres array](https://www.postgresql.org/docs/current/arrays.html) columns correctly. This means that specifying an array value for a postgres array column in your transform.ts did not work correctly. This releases fixes this so that you can specify an array value for these fields. For example:
// In /your/project/.snaplet/transform.tsimport{copycat}from'@snaplet/copycat'importtype{Transform}from"./structure"constconfig: Transform=()=>({User: ({ row })=>({// if the type of the column is text[], you can get and set the values// as an array of stringsemails: [copycat.email(row.emails[0]),copycat.email(row.emails[1])]})})exportdefaultconfig
Note that you’ll need to run snaplet config generate to regenerate the corresponding type definition fixes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Previously, we weren’t parsing and serialising results for [postgres array](https://www.postgresql.org/docs/current/arrays.html) columns correctly. This means that specifying an array value for a postgres array column in your
transform.tsdid not work correctly. This releases fixes this so that you can specify an array value for these fields. For example:Note that you’ll need to run
snaplet config generateto regenerate the corresponding type definition fixes.Beta Was this translation helpful? Give feedback.
All reactions