Is there a way to get typed results from executing a function on Postgres?
get_widgets
that returns rows. The default signature for rows
returned is Record<string, unknown>[]
Is there a way to specify the row type without having to cast to unknown
first?
```
interface Widget {
id: number...Are there any array size limitations for "inArray" filter method?
Uuid always the same with Bun randomUUIDv7() (?)
{mode: "json"} sqlite/libs sql does nothing
COALESCE to json array not working in sql function
``typescript
const productItemsImagesSQLAgg = sql<ProductItemImages[]>
COALESCE(...migrate using Bun SQL api
[Solved] Drizzle Studio blocked by CORS, mkcert "no security databases found"
apt
Firefox (pre-installed on Mint).
# mkcert --install
The local CA is already installed in the system trust store! 👍
ERROR: no Firefox and/or Chrome/Chromium security databases found
# mkcert --install
The local CA is already installed in the system trust store! 👍
ERROR: no Firefox and/or Chrome/Chromium security databases found
Tightening types on successful insert to not be `object | undefined`
db.insert(someTable).values(someValues).returning()
what would be the preferred way to narrow the type of the return value from object | undefined
if the insert is successful?
I'm trying to do some seeding where I create some entries in one table and save them as variables, and then attempt to insert the IDs of those entries into another table as a foreign key that's non-nullable and TS tells me that they're potentially undefined, which is true.
Since this is seeding, I know I'm clearing my DB before this, so I know the inserts will succeed and that it's not an issue if they don't) so would the best way to silence these errors just be to add !
to the objects when doing returnedObject!.id
?
...Missing Refine type after update
CHECK constraints not working with drizzle-orm/pg-core

Type Inference Issue: Missing | null on Relational Fields in Drizzle ORM
``ts
// Query 1: Drizzle relational query
// Result type incorrectly omits
| undefined or
| null for
customer`.
const res = db.query.company.findFirst({...foreignKey function options
restart increment for refNumber column starting from 1
Neon migrations are not running in transaction
Bad Field Error
Do all migration files get executed in single transaction?
transactions rollback
Error: getaddrinfo ENOTFOUND ep-delicate-thunder-a58xbwga.us-east-2.aws.neon.tech
npx drizzle-kit generate
but not able to migrate it npx drizzle-kit migrate
or npx drizzle-kit studio
when I am trying to open up the drizzle studio or run migrations, I am getting this error please find attachments.
don't know from where it's coming, my internet is working fine...