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
constclient=awaitPGlite.create(...);constdb=drizzle({ client });// Workaround for https://github.com/drizzle-team/drizzle-orm/issues/3975constoriginalExecute=db.execute;// @ts-expect-error drizzle has incorrect types for pglitedb.execute=asyncfunctionexecuteUnwrappingRows(...args){constresult=awaitoriginalExecute.apply(this,args);returnresult.rows;};
The types seem to be wrong for better-sqlite3 as well. The execute function appears as not available in the db instance type, but there are plenty of examples in Drizzle documentation showing the call db.execute('select 1'); as an example.
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.38.2
What version of
drizzle-kit
are you using?0.30.1
Other packages
@electric-sql/[email protected],@types/[email protected],[email protected]
Describe the Bug
When using
the return type is declared as
postgres.RowList<{ a_number: number; }[]>
.But when using pglite, the actual
result
isI'm not yet sure where this bug exists. It may be in pglite or @types/pg.
Here's how we're setting up pglite with Drizzle per these docs:
The text was updated successfully, but these errors were encountered: