drizzle-team / drizzle-team/drizzle-orm

[BUG]: db.execute not defined - can't follow documentation

Open
#2,331 2 comments 11 reactions 0 assignees View on GitHub
db/sqlite docs docs/undocumented priority
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### What version of `drizzle-orm` are you using?

0.30.10

### What version of `drizzle-kit` are you using?

0.30.10

### Describe the Bug

The documentation says I can run `db.execute(....)`

https://orm.drizzle.team/docs/sql#sql-template

But I get "_db.execute is not a function_"

I can use `db.select()`. And I can use `execute() `at the end of a select chain. I just can't use a raw execute

Am trying to run this on D1 to get a list of tables: `await db.execute(sql'PRAGMA table_list');`

(note:with back ticks)

### Expected behavior

Was expecting `db.execute()` to be available, as in documentation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.