$if with sql.raw doesn't compile
const filterWhereQuery = sql.raw(
LOWER("${dimensionName}") LIKE '%${filter?.toLowerCase()}%');
...<SqlBool>
generic to your sql
template tag....ORDER BY in agg function.
json_agg(table ORDER BY column) as values
json_agg(table ORDER BY column) as values
Binary fields in mySQL
typeCast
config of mysql2
```ts
typeCast: function (field, next) {
if (field.type === 'TINY' && field.length === 1) {...jsonb_build_object and raw sql possibilities
``
sql<string>
jsonb_build_object(${sql.join([
sql.raw('hair_type',coalesce (dog.hair_type, dog_breed.hair_type)
),
sql.raw('ear_type',coalesce (dog.ear_type, dog_breed.ear_type)
),...ts_rank in select
as
method.
sql<number>`ts_rank(to_tsvector('english', users.email, websearch_to_tsquery('R2023-185'))`.as('rank'),
sql<number>`ts_rank(to_tsvector('english', users.email, websearch_to_tsquery('R2023-185'))`.as('rank'),
How to convert this raw query to kysely?
Converting a more complex query to Kysely
Error "isSelectQueryBuilder" while using doUpdateSet on conflict
doUpdateSet
expression during an on conflict statement for an insert.
From my experiments, if the select type of the column is different (not assignable to) the insert/update types than something breaks at the type level and gives me an error
Repro:
https://kyse.link/?p=s&i=Wt7lre2AUUH7EdAInOja...New type error in 0.26.3
what is this error, i started getting it randomly
Kysely doesn't work in jest/test environment
db.selectFrom(...
commands just times out. I tried to log things via:
```
log(event) {
console.log(event);...Is there a plan to add "NULLS NOT DISTINCT" (postgresql v15) option to unique constraints/indexes?
How to work with window function ROW_NUMBER correctly?
``
const query =
WITH ranked_licenses AS (...executeTakeFirst does not add limit(1). Why?
How do you formulate a custom type argument?
How do I type the arguments to a function?
function my_favorite_function(unknown, unknown, unknown)
function my_favorite_function(unknown, unknown, unknown)
InsertInto with all default values?
INSERT INTO test DEFAULT VALUES returning
INSERT INTO test DEFAULT VALUES returning
Can this query translate to kysely?
``sql
sql
SELECT
frr.reimbursement_request_id,
frr.reference_no,
frrt.request_type,...Deferred Join
order by
, limit
and offset
values to the inner join query but I'm having trouble finding a way syntactically to apply this to the inner join. Do I need to use the sql
escape hatch? If so, I'm also struggling with where I'd apply that too!
Any pointers appreciated as always, thanks...Stumped - sqlite kysely no data from select query
node-sqlite3
and kysely
. I'm able to post data, but for some reason select
comes up empty. I feel like I'm missing something low-level here. Thank you in advance. I've been banging my head on this off and on for 2 days.
db.ts
```ts
import sqlite3 from 'sqlite3';...