roob
DTDrizzle Team
•Created by roob on 8/28/2023 in #help
JSON with PostgreSQL not serializing correctly
I have define my field like this:
Which looks fine when I look at the table structure.
Now I have the following object I'm creating/updating, which has a string[] as hostnames:
After this is added, the value in the database is escaped like this:
This does not look correct, it looks like wrongly serialized. Or what am I doing wrong here?
The following SQL should extract the first value, however because it's wrongly serialized, it gives me the JSON serialization as the first value:
3 replies
DTDrizzle Team
•Created by roob on 8/7/2023 in #help
Do I need to close the DB connection after running a script using drizzle?
I have a very simple script to import some CSV data:
The script runs (executed with
tsx
) and I can see the rows inserted, but the script is not exiting. It just 'hangs' after this loop. Do I need to manually close the db connection?25 replies
DTDrizzle Team
•Created by roob on 3/16/2023 in #help
Example failed to run: `pg` does not provide an export named `Pool`
I'm trying to run the example from the
README
file. I made a minial version, installed pg
, @types/pg
, drizzle-orm
and drizzle-kit
and tried to run it via tsx
.
This is my stripped down example:
This is my tsconfig.json
:
Running it:
9 replies