sql where column md5

Hey, how can I achieve the following statement in drizzle?
-- mysql

SELECT * FROM podcasts_title
WHERE MD5(guid)='baf59ee6be7bf0cc8140038d7cd641b4'
-- ^^^^^^^^^
-- mysql

SELECT * FROM podcasts_title
WHERE MD5(guid)='baf59ee6be7bf0cc8140038d7cd641b4'
-- ^^^^^^^^^
await db
.select()
.from(podcastsTitle)
.where(
eq(podcastsTitle.guid, songId)
// ^^^^^^^^^^^^^^^^^^
)
await db
.select()
.from(podcastsTitle)
.where(
eq(podcastsTitle.guid, songId)
// ^^^^^^^^^^^^^^^^^^
)
1 Reply
patwoz
patwozOP7mo ago
Solution:
eq(sql`MD5(guid)`, songId)
eq(sql`MD5(guid)`, songId)
Want results from more Discord servers?
Add your server