-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[ISSUE #3088]Standardize sql statement format in xml file #3092
Conversation
<include refid="Base_Column_List"/> | ||
from rule | ||
where id = #{id,jdbcType=VARCHAR} | ||
FROM rule |
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.
The keyword FROM
is not right-aligned.
<include refid="Base_Column_List"/> | ||
from rule | ||
where name = #{name,jdbcType=VARCHAR} | ||
FROM rule |
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.
The keyword FROM
is not right-aligned.
FROM rule | ||
WHERE 1=1 | ||
AND name = #{name,jdbcType=VARCHAR} | ||
AND selector_id = #{selectorId,jdbcType=VARCHAR} |
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.
The keywords are not right-aligned.
</select> | ||
|
||
<select id="selectByQuery" parameterType="org.apache.shenyu.admin.model.query.RuleQuery" resultMap="BaseResultMap"> | ||
select | ||
SELECT |
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.
SELECT
should be back a space to keep right-aligned
@@ -81,63 +81,62 @@ | |||
</select> | |||
|
|||
<select id="findBySelectorId" parameterType="java.lang.String" resultMap="BaseResultMap"> | |||
select | |||
SELECT |
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.
SELECT
should be back a space to keep right-aligned
</select> | ||
|
||
<select id="findBySelectorIds" parameterType="java.util.List" resultMap="BaseResultMap"> | ||
select | ||
SELECT |
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.
SELECT should be back a space to keep right-aligned
<foreach item="selectId" collection="list" open="(" separator="," close=")"> | ||
#{selectId, jdbcType=VARCHAR} | ||
</foreach> | ||
</select> | ||
|
||
<select id="countByQuery" parameterType="org.apache.shenyu.admin.model.query.RuleQuery" | ||
resultType="java.lang.Integer"> | ||
select count(1) | ||
from rule | ||
SELECT count(1) |
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.
SELECT should be back a space to keep right-aligned
</select> | ||
|
||
<select id="selectAll" resultType="org.apache.shenyu.admin.model.entity.RuleDO" resultMap="BaseResultMap"> | ||
select | ||
SELECT |
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.
SELECT should be back a space to keep right-aligned
</select> | ||
|
||
<select id="existed" resultType="java.lang.Boolean"> | ||
select true from rule where id = #{id} limit 1 | ||
SELECT true FROM rule WHERE id = #{id} limit 1 |
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.
The keywords are right-aligned and the fields are left-aligned and displayed in multiple lines.
</select> | ||
|
||
<insert id="insert" parameterType="org.apache.shenyu.admin.model.entity.RuleDO"> | ||
insert into rule (id, date_created, date_updated, | ||
INSERT INTO rule (id, date_created, date_updated, |
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.
The keywords are right-aligned and the fields are left-aligned and displayed in multiple lines.
update rule | ||
set date_created = #{dateCreated,jdbcType=TIMESTAMP}, | ||
UPDATE rule | ||
SET date_created = #{dateCreated,jdbcType=TIMESTAMP}, |
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.
The keywords are right-aligned and the fields are left-aligned and displayed in multiple lines.
delete from rule | ||
where id = #{id,jdbcType=VARCHAR} | ||
DELETE FROM rule | ||
WHERE id = #{id,jdbcType=VARCHAR} |
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.
WHERE
should be right-aligned with FROM
.
</delete> | ||
|
||
<delete id="deleteByIds" parameterType="java.util.List"> | ||
delete from rule | ||
where id in | ||
DELETE FROM rule |
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.
WHERE should be right-aligned with FROM.
Codecov Report
@@ Coverage Diff @@
## master #3092 +/- ##
============================================
+ Coverage 58.93% 59.04% +0.11%
- Complexity 4394 4406 +12
============================================
Files 694 694
Lines 19934 19934
Branches 1800 1800
============================================
+ Hits 11748 11771 +23
+ Misses 7184 7163 -21
+ Partials 1002 1000 -2
Continue to review full report at Codecov.
|
For #3088.
Make sure that:
mvn clean install -Dmaven.javadoc.skip=true
.