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

default value support #431

Merged
merged 8 commits into from
Sep 19, 2022
Merged

default value support #431

merged 8 commits into from
Sep 19, 2022

Conversation

lookup-cat
Copy link
Member

支持mysql、postgresql的default关键字,可在insert语句中使用

相关文档:

protected open fun <T : Any> visitDefaultValue(expr: DefaultValueExpression<T>): DefaultValueExpression<T> {
writeKeyword("default ")
return expr
}
}
Copy link
Member

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
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同理,新的表达式类型需要在 PostgreSqlExpressionVisitor 增加相应的 visit 函数

@vincentlauvlwj
Copy link
Member

啊对了,这好像是你第一次给 ktorm 主仓库提 PR,还需要改一下这个文件,在 develpers 里面加上你的信息

@vincentlauvlwj vincentlauvlwj changed the base branch from master to v3.6.x September 19, 2022 06:39
@vincentlauvlwj vincentlauvlwj merged commit 219ee5d into kotlin-orm:v3.6.x Sep 19, 2022
vincentlauvlwj added a commit that referenced this pull request Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants