© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
32 replies
binajmen

Why is 1 and 0 are returned as string?

With the following:
isUsed: sql<boolean>`case when ${usedExchanges.data} is not null then 1 else 0 end`
isUsed: sql<boolean>`case when ${usedExchanges.data} is not null then 1 else 0 end`

I get
isUsed
isUsed
as
"1"
"1"
or
"0"
"0"
whereas I would expect a boolean.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

TIMESTAMPTZ is returned as string instead of Date object
Drizzle TeamDTDrizzle Team / help
3y ago
Numeric // Decimal Postgres types are inferred as strings and expect string as an input as well
Drizzle TeamDTDrizzle Team / help
3y ago
date column not being returned as string by drizzle
Drizzle TeamDTDrizzle Team / help
3y ago
latitude and longitude are string type but were defined as numeric
Drizzle TeamDTDrizzle Team / help
2y ago