Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE]: Support feature Generated Columns #2014

Closed
TenviLi opened this issue Mar 15, 2024 · 2 comments
Closed

[FEATURE]: Support feature Generated Columns #2014

TenviLi opened this issue Mar 15, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@TenviLi
Copy link

TenviLi commented Mar 15, 2024

Enhancement Request

Drizzle ORM currently lacks support for SQL generated columns.

Example1:

Consider a scenario where a JSON object, containing user's profile information, is inserted into a table.

The generated columns feature of SQL can be used to extract the user's age attribute from the JSON and place it in an external column instantly.

This improves query efficiency as we can directly access the age without having to search within the JSON each time.

Example2:

Consider a situation where a Users table contains a JSON array with a list of IDs from an associated table.

It would streamline the process immensely if, during data insertion into Users, the related table could also auto-populate with the IDs from the JSON array.

@TenviLi TenviLi added the enhancement New feature or request label Mar 15, 2024
@denis-ilchishin
Copy link

#1471

@L-Mario564
Copy link
Collaborator

@AndriiSherman This should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants