Dynamic query parts based on user input
Unable to use table name with 3 dots in selectFrom
Updateable primary key question & .set() type safety
ColumnType
with never
in the 3rd generic value.
```ts...Error: don't await SelectQueryBuilder instances directly.
execute
or executeTakeFirst
.
I'm trying to create a function that enhances the query (SelectQueryBuilder
) with pagination, sorting and filtering options that are derived from a HTTP request.
This function looks like:...then
method gets called. Kysely query builders all have a then
method that throws that exception. It's there because many other query builders and ORMs allow you to do stuff like
const result = await db.selectFrom('person').selectAll()
const result = await db.selectFrom('person').selectAll()
JSON Object Traversal
sess
column:
```json
{
"cookie": {...->>
for all of them?express-session store
express-session
. For example, to use in combination with passport
.
For example, I was wondering if Kysely somehow exposes a pg
compatible pg.Pool
, which would allow me to use something like connect-pg-simple
to have an adapter from the Kysely world to the pg
world....pg.Pool
that Kysely uses when I added the Postgres dialect, so that solves that problem 😄Synchronous queries to SQLite?
better-sqlite3
is a synchronous library and Kysely's SQLite dialect uses better-sqlite3
, so is there a way to make synchronous queries?Return type when fields are conditional
What's the best way to use Pick with Selectable/Insertable/Updatable?
Issue with select
Issue with migrating from knex
how to decode a point to `{x: number, y: number}` when selected inside `jsonBuildObject`?
{x: number, y: number}
, but when i wrap it in jsonBuildObject
i get it as the raw string.
example:
```ts...need advice how to configure driver to return prefixed or drizzle style selections
problem with nested jsonArrayFrom and jsonObjectFrom
eb
for all depths. The one you've used doesn't have line
nor subline
in its query context.
This works:...Is there way to select every field from table using `select` instead of `selectAll`?
selectAll
does the job, but I also need to populate some relations and build json_agg
s. Is there way to either select every column from table (and then build jsonObject) or extend selectAll
with some extra fields?
```
db
.selectFrom('document')
.select((eb)=> [....selectAll('document')
.select(eb => ...)
.selectAll('document')
.select(eb => ...)
select / groupBy combined helper
How to delete and insert in one query
.filterWhere inference
.$narrowType
for this.json object relation null problem
undefined
or ?
in your type interfaces.How to narrow type from jsonArrayFrom
Single Table Inheritance
table. I believe this is possible, but after some fighting with api and syntax I am not sure how to make it.
Here is my query:
(sorry for polish, Ubiquitous Language with domain masters)
```....$narrowType<PrzyjecieZewnetrznePozycjaRozbicieSelect>()
has to be straight after jsonArrayFrom
not at the top level