-
Notifications
You must be signed in to change notification settings - Fork 695
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
feat: EXPOSED-78 Support database-generated values for columns #1844
Conversation
701a012
to
3a4f235
Compare
3a4f235
to
e5d0391
Compare
@@ -39,6 +39,8 @@ class Column<T>( | |||
|
|||
fun defaultValueInDb() = dbDefaultValue | |||
|
|||
internal var isGeneratedInDb: Boolean = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we check what names are used in other frameworks for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is what I found:
I didn't find this feature in Ktorm and jOOQ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
databaseGenerated
lgtm
exposed-tests/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/entities/EntityTests.kt
Outdated
Show resolved
Hide resolved
7ed4abd
to
e5d8095
Compare
…ains#1844) * feat: EXPOSED-78 Support DB-generated values for columns This feature will enable marking a column as databaseGenerated to be able to omit setting it when inserting a new record without getting an error. The value for the column can be set by creating a TRIGGER or with a DEFAULT clause, for example.
This feature will enable marking a column as
databaseGenerated
to be able to omit setting it when inserting a new record without getting an error. The value for the column can be set with TRIGGER or DEFAULT, for example.