Comments (6)
Generated columns are now also supported in master. Not released yet. You can use it like this:
db.schema
.createTable('person')
.addColumn('full_name', 'varchar(255)',
(col) => col.generatedAlwaysAs("concat(first_name, ' ', last_name)").stored()
)
.execute()
from kysely.
0.9.9 version now has createView
and dropView
methods in the schema module.
from kysely.
Thanks for those 3 extremely quick update, I will try to test these new migration as soon as I can
To be honest I had to replace some prisma query for more optimized query and working with Kysely as been fantastic so far, so thank you
from kysely.
0.10.0 also supports materialized views. There's a couple of breaking changes in 0.10.0 https://github.com/koskimas/kysely/releases
from kysely.
You can always run raw queries in migrations using db.raw
. Views could be one of the next things to add. I've never used generated columns or heard anyone using them. But I'll see if it's easy to add support for those too.
from kysely.
True, I could always create the table and add a manual alter table after π€
Generated column are quite new (PG 12) and to be honest the only time I saw them used is here
from kysely.
Related Issues (20)
- Node 14 support is missed after bumping to version 0.27.0
- agg requires two type parameters HOT 1
- Selectable and Insertable types are not generating correct types HOT 1
- Spanish tutorial for Kysely basics Available
- modifying data (e.g. updateTable) inside a migration HOT 5
- Support for node16 and nodenext module resolution HOT 1
- Allow parameters in ExecuteStatement for RDS Aurora Data API HOT 2
- add modifyFront/modifyEnd to all queryBuilder classes
- How to prevent Kysely from crashing node app if database goes down HOT 6
- How to write custom SelectQueryBuilder? HOT 2
- SelectQueryBuilder preventAwait makes it impossible to return a query from an async function. HOT 2
- Add support for Postgres bulk update statement HOT 3
- Introspect should also fetch column comments so we can generate typescript comments HOT 1
- Postgres migrateUp sometimes failing if migration name has a "-" character HOT 2
- syntax error at or near "returning" with vercel postgres database HOT 3
- Fix: Mssql introspection duplicate columns
- Add limit method for UpdateQueryBuilder
- JSON select types are working incorrectly with zod passthrough object HOT 5
- Compile time checks for empty arrays HOT 2
- Incorrect types and missing suggestions when using object index signature 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.