drizzle-orm icon indicating copy to clipboard operation
drizzle-orm copied to clipboard

[BUG]: sqlite blob<{foo: string}> not working

Open magicdawn opened this issue 1 year ago • 1 comments

What version of drizzle-orm are you using?

0.26.5

What version of drizzle-kit are you using?

0.18.1

Describe the Bug

demo code from https://orm.drizzle.team/docs/column-types/sqlite#blob not working

image

blob<{ foo: string }>('blob', { mode: 'json' })

after search, I found usage of $type in https://github.com/drizzle-team/drizzle-orm/issues/635 do works

image


I guess the documentation is too new or outdated.

Expected behavior

No response

Environment & setup

No response

magicdawn avatar Jun 02 '23 14:06 magicdawn

The docs have outdated syntax. Use blob('blob', { mode: 'json' }).$type<{ foo: string }>()

dankochetov avatar Jun 02 '23 15:06 dankochetov