Accessing underlying methods on the client
Kysely
class itself, or if it is necessary for me to write my own extension of the class to achieve thisIs there an easy tool to convert my existing knex migrations to kysely migrations?
What am I not understanding about ColumnType?
How to do `LIKE ANY` query in Kysely?
ANY
into the query.
```sql
SELECT *
FROM your_table
WHERE your_column LIKE ANY (ARRAY[...Creating snippets (best pratice)
How to order by desc using expression builder with case
desc
to the eb.
```ts
const person = await db
.selectFrom("person")...Is it possible to do "for await (const iterator of db.selectFrom("table").selectAll()) {....}
Question about ColumnTypes and dates.
DATE
(yyyy-mm-dd).
```sql
CREATE TABLE IF NOT EXISTS person(
id INT NOT NULL,...ColumnType
which would be used in where
statements (and other similar statements).
But then subqueries in where
statements would break if the select type and the query type don't match....How to type tables with dynamic names?
.withTables
and in the queries, and implement a plugin that on-the-fly adds the random suffix to all references to that table....clone select query
Any limits on insertValues(array)?
Migration to seed huge amount of data
Creating a jsonAgg helper funtcion that returns a context aware `AggregateFunctionBuilder`
eb.fn.jsonAgg
does but for JSONB.
- I have tried using the helpers/postgres/jsonArrayFrom
, but that is functionally not the same because it creates a subquery.
- I have tried creating a simple helper, but it's not type/context aware, and it doesn't support method chaining (.distinct()
for example):
...How to add array column in migrations?
.addColumn('countyNames', sql`varchar[]`)
.addColumn('countyNames', sql`varchar[]`)
are conditional CTEs possible?
Type 'QueryCreatorWithCommonTableExpression ... The types returned by 'with(...)' are incompatible between these types.
...Dynamic conditional raw query question
``ts
await sql
SELECT
column AS "data"
FROM my_table ...Update on conflict clause
SelectAll Overwrites column with same field name in a join
concat in postgres
||
to concat. What am I doing wrong?
```
let warehouses = await db
.selectFrom('warehouse as w')...