Using MySQL functions in SELECT statement
selectRaw
for these
SELECT a, b, UPPER(c) FROM x;
...Extract OrderBy TS Keys
insert into with mix of static and table values
INSERT INTO some_table (a, b, c, d) SELECT o.a, o.b, 16, 'hello world' FROM other_table O WHERE somekey = 32;
INSERT INTO some_table (a, b, c, d) SELECT o.a, o.b, 16, 'hello world' FROM other_table O WHERE somekey = 32;
Migration error "TypeError: Cannot read properties of undefined (reading 'getExecutor')"
where clause with length
select * from data where length(prodcode) = 3
...show generated sql
Property does not exist on type
Correct type definitions for function receiving builder

Transform Postgres array into JS array
{one, two}
into JS arrays ['one', 'two']
. Right I know the Postgres array is turned into a string when executing queries.select(sql<string[]>`categories::text[]`.as('categories'))
.select(sql<string[]>`categories::text[]`.as('categories'))
Noob Question: SQL INSERT that combines static values with a SELECT statement
Is there a way to execute an ExpressionBuilder?
Argument of type 'string' is not assignable to parameter of type 'DynamicReferenceBuilder<never>'.
fn("round", [fn.min("ld.price_btc"), sql.lit(5)]).as("floor_price"),
fn("round", [fn.min("ld.price_btc"), sql.lit(5)]).as("floor_price"),
How do Date columns works?
modified_at: ColumnType<Date, string | undefined, never>
modified_at: ColumnType<Date, string | undefined, never>
converting result.insertedId to number
result.insertedId
from bigInt
to Int
using Number(result.insertedID)
?Advice on building plugin for working with parameters
Mysql Query execution never ends
createPool
from mysql2
and not mysql2/promise
....
How to do join with raw sql snippets?
left join videos on videos.id = CAST(highlights_content.item AS INT) AND highlights_content.collection = 'videos'
I tried using the provided sql
helper but can't really figure out which parts I need to replace with raw SQL for this to be possible....More elegant way to handle nested relations?
withSomething
but it becomes quite verbose and not easy to read. Here's one of my relation helper functions:
```ts
export function withLinks<T>(
eb: ExpressionBuilder<DB, 'banners'>,
fn: (...Join DATE_TRUNC
Why does kysely-codegen generate the schema in node_modules?