DT
Drizzle Team.deini
sql escaping on where
Trying to do the following:
But it breaks on the secon unaccent with
could not determine data type of parameter $1
. What am I missing? 🤔.deini•320d ago
I "solved" it by using:
A bit worried about using
raw
Now using:
Suji•266d ago
ran into a simillar issue where im conditionaly building the where clause
where.push(
sql
CONCAT(${users.firstName},' ', ${users.lastName}) ILIKE '%${name}%'
,
);
this throws a bind message error
you can build the string like this, where your adding the % within the interpolation
sql`CONCAT(${users.firstName},' ', ${users.lastName}) ILIKE ${'%' + pageOptionsDto.name + '%'}The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.4KMembers
View on DiscordWant results from more Discord servers?
More PostsBroken typescript in selectWhatever I put inside the select function. it will generate this typescript error:
I am using the laWhy is introspecting creating tables that didn't previously existMore context here: https://github.com/drizzle-team/drizzle-orm/issues/847Passing SQL functions to insertIs there any way to pass a SQL function like `gen_random_uuid()` to the `insert` function, for a speDrizzle-kit database push connection errorWhen trying to run `drizzle-kit push:mysql` to push my schema to Planetscale, I get the following erTypescript error when importing the planetscale-drizzle db instance.my db is hosted on planetscale and im trying to do the setup as explained in the drizzle docs but whMapped column name and relation with the original nameHi, I am taking over an old project and have found an issue, I'm not sure if I should file it as a bHow to properly do foreign keys in schema with PlanetScale?I'm aware that foreign key *constrains* aren't supported, but foreign keys themselves are.
push:
``Typescript path alias not working properlyI'm new to Drizzle, but I'm not able to use the path alias on schema files.
Using absolute paths on