Webstorm warning with multiple joins
How do I use `WHERE NOT EXISTS`?
transforming database values to JS values (dates in sqlite)
How to enable pragmas with SqliteDialect
Foreign key constraints are disabled by default (for backwards compatibility), so must be enabled separately for each database connection....
Dynamic return type based on provided select array
How to work with json columns?
Does the TypeScript performance scale with larger projects?
SQLite__namespace is not a constructor
import SQLite from 'better-sqlite3'
import SQLite from 'better-sqlite3'
Raw SQL in where clause
0.27.0
.
```....where('disabled_at', '>', sql<Date>`now()`)
.where('disabled_at', '>', sql<Date>`now()`)
smallint support (Postgres)
addColumn<CN extends string>(columnName: CN, dataType: DataTypeExpression, build?: ColumnBuilderCallback): CreateTableBuilder<TB, C | CN>;
addColumn<CN extends string>(columnName: CN, dataType: DataTypeExpression, build?: ColumnBuilderCallback): CreateTableBuilder<TB, C | CN>;
addColumn("foo", sql`smallint`)
addColumn("foo", sql`smallint`)
Examples inner join using OR?
ON a.id = b.id OR a.sub_id = b.sub_id
full join "using" list of columns
using
, what is the correct way ?
example:
```...Is kysely sanitizing sql injection when using raw sql ?
${myString}
where myString contains sql injection, will kysely sanitize it or is it something that I need to take care of ?...Support for D1 batching
Omit/filter out columns from query
select(['1','2','3','4','5','6','7','8','10']
select(['1','2','3','4','5','6','7','8','10']
How to create a typed array of columns for select?
jsonObjectFrom
helpers since they are valid Select optionsReturn `null` by default if no record found
null
instead of undefined
if no records match my query when using executeTakeFirst
. Is there a way to set this in the Kysely client?cmpr as eb call SqlBool return type
eb.cmpr
has been removed and I now need to use eb()
as a function. Is there an easy way to get back a boolean
instead of a SqlBool
?
Before I just needed to call it like eb.cmpr<boolean>
. Thanks!
(I mean, other than a plain type assertion)...eb(...).$castTo<boolean>()
Argument of type 'RawBuilder<unknown>' is not assignable to...
sql<string>`(SELECT activityId FROM activities WHERE MATCH(EL_EQ_PRODUCT_DESCRIPTION) AGAINST (${'+' + value} IN BOOLEAN MODE))`
sql<string>`(SELECT activityId FROM activities WHERE MATCH(EL_EQ_PRODUCT_DESCRIPTION) AGAINST (${'+' + value} IN BOOLEAN MODE))`
Generic function to stream a table
Schema
, T
etc. are really wide (in this case completely unbounded). There's no information for Kysely to work with. The types don't work unless you give it an actual bounded schema.
You should avoid generic functions like this when using Kysely. Super strict and generic just don't work well together....