Comments (5)
This is now fixed in 0.27.2
from kysely.
The whole query builder is untyped in the migrations by design. Migrations must always be runnable and the code can never change, but the types change when the project evolves. If we used column types in the migration, what'd happen to your migration when, for example, the id
field of your emails
table is renamed to email_id
?
from kysely.
Oh, it's actually any
and not ExpressionBuilder<any>
. Sorry about that. Yeah it should still be an ExpressionBuilder
.
from kysely.
Makes sense, but couldn't the callback to (for example) the untyped .set((eb) => ...)
get an instance of ExpressionBuilder<any>
rather than just any
?
from kysely.
For now you can use this
const eb = expressionBuilder<any, string>()
await db
.updateTable('emails')
.set({
id: eb.ref('emails.id')
})
.where('id', 'is', null) // <-- null instead of 'NULL'
from kysely.
Related Issues (20)
- Type Error for BLOB columns when using D1 Databases HOT 1
- [Question] best way to create reusable type-aware filters HOT 2
- Calling Migrator.migrateToLast() exits process HOT 2
- Add an AlterTypeBuilder
- where with sql complains about Property 'isSelectQueryBuilder' is missing HOT 1
- Improvement of lateral support HOT 2
- Migrations can be modified without notice HOT 3
- Incorrect type when using left join and json agg (postgres) HOT 3
- Also publish to JSR?
- Large offsets are converted to scientific notation HOT 1
- Documentation for UpdateResult HOT 1
- OnConflict update all Fields HOT 6
- Inserting large number of rows leads to exec_bind_message error in postgres HOT 1
- Question about a generic getById HOT 2
- May anyone help me with the short version of selectAll type? HOT 1
- RuntimeDriver is not exported HOT 1
- `SELECT` in SQL template tag has parens around it, making it invalid in some contexts in SQLite HOT 3
- Are there any plans to support mikro-orm? HOT 2
- Support for Postgres ?| operator (do any of these array strings exist as top-level keys) HOT 1
- Create a generic function with narrowed type in `ExpressionBuilder` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kysely.