Comments (1)
Kysely doesn't touch the data. It simply passes things to the underlying driver as parameters. https://kysely.dev/docs/recipes/data-types
You need to see the driver's documentation. In this case that's pg
.
As the error message says, one option is an explicit cast:
function asUuid(id: string) {
return sql<string>`${id}::uuid`
}
await db.insertInto('documents').values([
{
id: asUuid('b4d99282-e0e2-4407-a5c0-f63d830c9f62'),
textract: '',
created_at: new Date(),
updated_at: new Date()
}
]).execute();
from kysely.
Related Issues (20)
- Web, Getting Started - MySQL dialect example produces type error HOT 4
- `sql` tag function should be available on the `Kysely` interface HOT 1
- Support ADD COLUMN IF NOT EXISTS and DROP COLUMN IF EXISTS
- Feature request in adding ExecuteTakeFirstOrThrow HOT 3
- `eb` assumes unknown operators to be arithmetic operators HOT 1
- Adding a statement or node to the beginning of a query HOT 3
- Add select from multiple tables and option to join other columns under alias HOT 1
- Ensuring that queries use their transaction HOT 1
- Typings broken with typescript 5.4.4: Type 'TB | ExtractTableAlias<DB, TE>' does not satisfy the constraint 'keyof DB' HOT 4
- Rollback doesnt trigger on error HOT 2
- Best practice for batch queries / mutations HOT 5
- Merging multiple queries HOT 20
- Suggestion: Allow Execution driver to execute multiple queries HOT 2
- Dynamic case building HOT 3
- Make mssql testable using apple silicon. HOT 5
- Creating a Table from a Typescript interface HOT 3
- Breaking change with addColumn between 0.27.2 and 0.27.3 HOT 4
- Mapping field names between database and object HOT 1
- Unable to create timetz with precision columns HOT 3
- What should I type binary data as? 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.