sql literal string in binary expression builder
"1.0"
since that means you're referencing a column named 1.0
Query result type mismatch
categoryId
to nested object built with jsonObjectFrom
or maybe it does not take related table, but copies selectFrom
table.
Why does it happen?
https://kyse.link/0sjoX...selectAll('product_category')
instead of selectAll()
in the subquery
Getting the underlying connection pool/client from a kysely wrapper
Dynamic callbackURL on login
postgres helper wrapping to_json referencing CTE?
recordToJson
) that is similar to jsonObjectFrom, but that references an existing CTE. in essence i want to be able to do something like this
```typescript
db
.selectFrom('foo')...Is it okay to repeatedly wrap a PG connection pool with kysely?
Convert record from Function call (RPC) to JSON
"(b38ed355-c2b0-4998-aff9-8c8dc429ffe5,My_Test_Key,valid,aead-det,22,\"\\\\x7067736f6469756d\",\"2025-01-19 02:09:04.392092+00\",,\"\")"
"(b38ed355-c2b0-4998-aff9-8c8dc429ffe5,My_Test_Key,valid,aead-det,22,\"\\\\x7067736f6469756d\",\"2025-01-19 02:09:04.392092+00\",,\"\")"
Generating dynamic raw query help
SELECT my_function(arg1 => 'some_value', arg2 => 123);
SELECT my_function(arg1 => 'some_value', arg2 => 123);
could not determine data type of parameter $1
cast(val("foo_col"), "text")
...Overcoming issue with `withSchema` and `forUpdate`
forUpdate
if withSchema
is used. Postgres doesn't like this and will error - I wonder if there is anything I can do short-term/now to skirt this issue that doesn't cause the typechecker to complain? Thanks!Kysely
instance. Unfortunately there's no other workaround before we fix the bug https://kyse.link/mj9c1Performance impact of "$if" ?
$if
calls to see if it helps. The impact is much smaller now than it was when I wrote that doc.How can I join 2 tables where 1 side is a JSON property in a JSON column?
2-Way transforming of types
Pagination
[Bug] innerJoinLateral selectAll prepends schema
db
variable that's instantiated withSchema
pointed at my_schema
2. selectFrom my_table
with an innerJoinLateral
on my_computed_object
3. select jsonObjectFrom(eb.selectFrom('my_computed_object').selectAll('my_computed_object'))
...withSchema('public')
for the subqueryExecuting stored procedure in MS SQL
sql
under the hood.
If these things can be introspected, there is potential in generating these type-safe functions....Flatten type of single column select?
$asScalar()
utility method that's probably landing in v0.28.
https://github.com/kysely-org/kysely/blob/v0.28/src/query-builder/select-query-builder.ts#L1938-L1986...Is there a way to execute parameterized SQL (with paremeters) within a kysely migration?
Typing enums
enums
. I create the role
table as an "enum" table (which I got from another help post I was reading earlier) and add it as an foreign key to the teacher
table.
```ts...