Comments (3)
Sorry my bad, in the documentation it says use null. Sorry.
Thanks for the help anyway
from kysely.
Everything works fine here https://kyse.link/?p=s&i=JJPzz6W6l6hZRgYq3wvD. Can you modify the code I linked to make it fail?
from kysely.
Oh sorry, seems like one important point was missing in the minimal example from me. https://kyse.link/?p=s&i=Gl3ckkdFIJe3186ORqp8
An optional attribute needs to be part of the table.
await db
.insertInto("job")
.values(job)
.onConflict((oc) =>
oc.column("uid").doUpdateSet({
last_modified_time: (eb) => eb.ref("excluded.last_modified_time"), // eb implicitly has an any type since 0.27.0
status: 12345 // does NOT complain about Type number is not assignable to type since 0.27.0
})
)
.execute();
export interface JobTable {
uid: string;
last_modified_time: Date;
status: string;
optionalString?: string;
}
export type NewSqlJob = Insertable<JobTable>;
from kysely.
Related Issues (20)
- Compile time checks for empty arrays HOT 2
- Incorrect types and missing suggestions when using object index signature HOT 2
- UUID doesn't seem to work for inserts (Postgres) HOT 1
- Loose typechecking on innerJoin/leftJoin comparisons HOT 2
- Support "using" in joins
- [Q] Reusable CTE (psql) HOT 1
- Issue with parentheses in Postgres using a conflict expression HOT 1
- Query execution result type always resolves to an empty object i.e. "{}" HOT 2
- camelCase plugin is not being applied to subquery results that incorporates jsonArrayFrom HOT 3
- Streaming results not working on Deno for PostgreSQL HOT 2
- Case of extremely slow type checking HOT 11
- ParseJSONResultsPlugin HOT 1
- `INCLUDE` clause in Postgres `createIndex`
- Pass client instance HOT 3
- Inject type from join via raw sql HOT 2
- Set role & configs HOT 2
- dropTable temporary modifier
- Ms sql server - database / schema / tablename HOT 4
- Autocomplete issue with TS 5.0.2 HOT 4
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.