Skip to content

修改添加mapSqlParameterSource策略#2

Closed
zenuo wants to merge 2 commits intomasterfrom
develop
Closed

修改添加mapSqlParameterSource策略#2
zenuo wants to merge 2 commits intomasterfrom
develop

Conversation

@zenuo
Copy link
Copy Markdown

@zenuo zenuo commented Dec 2, 2017

窄化top.fastsql.SQL#sqlParameterSource为final的MapSqlParameterSource实例。
在后续的添加参数方法中,将传入的参数加入到该实例中,避免运行时异常抛出导致操作失败。

Copy link
Copy Markdown
Member

@chenjazz chenjazz left a comment

Choose a reason for hiding this comment

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

改动有点大~有时间详细讨论


public SQL parameter(SqlParameterSource sqlParameterSource) {
this.sqlParameterSource = sqlParameterSource;
public SQL parameter(MapSqlParameterSource mapSqlParameterSource) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

paramer就是为了方便传入不同种类的SqlParameterSource

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

额,此处可以还原为SqlParameterSource,再将键值对加入。

@chenjazz chenjazz closed this May 22, 2018
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