-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Table Column with Default Expression #347
Comments
@billy1624, hello! I will do this. |
Thanks! @ikrivosheev |
Related Discussion: |
@billy1624 what do you think about new
|
No, bad ideas... We need to split QueryBuilder. For unavailable operations panic. |
Hey @ikrivosheev, sorry for the delay.
Do you mean introducing a new Lines 51 to 61 in 63e1894
pub enum ColumnSpec {
...
Default(DefaultValue)
...
}
// I just makeup the name, feel free to rename it :)
pub enum DefaultValue {
Func(Function),
Value(Value),
Custom(String),
} Something like this? |
Yes |
@billy1624 @tyt2y3 what do you think about custom |
|
@tyt2y3 @billy1624 hello! I have made several attempts and understand that is better to use |
I have no objection to either |
Hello @ikrivosheev, are you working on this? |
Motivation
CURRENT_TIMESTAMP
as the default expressionProposed Solutions
ColumnSpec::Default(Value)
should be changed to holdingSimpleExpr
, i.e.ColumnSpec::Default(SimpleExpr)
sea-query/src/table/column.rs
Lines 48 to 58 in 6c9527a
default
method and introduce a new method calleddefault_expr
which take anyInto<SimpleExpr>
sea-query/src/table/column.rs
Lines 142 to 149 in 6c9527a
The text was updated successfully, but these errors were encountered: