-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
default value support #431
Conversation
protected open fun <T : Any> visitDefaultValue(expr: DefaultValueExpression<T>): DefaultValueExpression<T> { | ||
writeKeyword("default ") | ||
return expr | ||
} | ||
} |
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.
增加新的表达式类型后,除了此处,还需要在 MySqlExpressionVisitor
增加相应的 visit 函数,方便第三方扩展,否则新的表达式会默认派发到 visitUnknown
writeKeyword("default ") | ||
return expr | ||
} | ||
|
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.
同理,新的表达式类型需要在 PostgreSqlExpressionVisitor
增加相应的 visit 函数
啊对了,这好像是你第一次给 ktorm 主仓库提 PR,还需要改一下这个文件,在 develpers 里面加上你的信息 |
支持mysql、postgresql的
default
关键字,可在insert
语句中使用相关文档: