Skip to content

'sql'#162

Open
qipengwei wants to merge 1 commit into
hcsp:masterfrom
qipengwei:master
Open

'sql'#162
qipengwei wants to merge 1 commit into
hcsp:masterfrom
qipengwei:master

Conversation

@qipengwei

Copy link
Copy Markdown

1

@hcsp-bot

Copy link
Copy Markdown
Contributor

🎉 感谢提交Pull Request!请稍等片刻,我们已经将其提交到CI进行检查,一旦有结果会立即通知您!

@@ -1,10 +1,13 @@

package com.github.hcsp.sql;
import com.sun.java.browser.plugin2.liveconnect.v1.Result;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

无用导入 - com.sun.java.browser.plugin2.liveconnect.v1.Result 。


package com.github.hcsp.sql;
import com.sun.java.browser.plugin2.liveconnect.v1.Result;
import com.sun.org.apache.xpath.internal.operations.Or;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

无用导入 - com.sun.org.apache.xpath.internal.operations.Or 。

package com.github.hcsp.sql;
import com.sun.java.browser.plugin2.liveconnect.v1.Result;
import com.sun.org.apache.xpath.internal.operations.Or;
import org.h2.jdbcx.JdbcDataSource;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

无用导入 - org.h2.jdbcx.JdbcDataSource 。

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.*;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

不应使用 '.*' 形式的导入 - java.sql.* 。

List<User> users = new ArrayList<>();

String sql = "select * from user order by id desc limit ? offset ?";
try(PreparedStatement statement = databaseConnection.prepareStatement(sql)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'try' 后应有空格。

public static List<Order> getLeftJoinOrders(Connection databaseConnection) throws SQLException {
return null;
List<Order> orders;
String sql = "SELECT \"ORDER\".USER_ID, USER.NAME AS USER_NAME, GOODS.NAME AS GOODS_NAME, \"ORDER\".GOODS_NUM * \"ORDER\".GOODS_PRICE AS TOTAL_PRICE\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'+' 应另起一行。

return null;
List<Order> orders;
String sql = "SELECT \"ORDER\".USER_ID, USER.NAME AS USER_NAME, GOODS.NAME AS GOODS_NAME, \"ORDER\".GOODS_NUM * \"ORDER\".GOODS_PRICE AS TOTAL_PRICE\n" +
"FROM \"ORDER\"\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'+' 应另起一行。

List<Order> orders;
String sql = "SELECT \"ORDER\".USER_ID, USER.NAME AS USER_NAME, GOODS.NAME AS GOODS_NAME, \"ORDER\".GOODS_NUM * \"ORDER\".GOODS_PRICE AS TOTAL_PRICE\n" +
"FROM \"ORDER\"\n" +
"LEFT JOIN USER ON \"ORDER\".USER_ID = USER.ID\n" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

'+' 应另起一行。

try {
if (!resultSet.next()) break;
Integer id = resultSet.getInt(1);
String user_name = resultSet.getString(2);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

名称 'user_name' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。

if (!resultSet.next()) break;
Integer id = resultSet.getInt(1);
String user_name = resultSet.getString(2);
String goods_name = resultSet.getString(3);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

名称 'goods_name' 必须匹配表达式: '^[a-z][a-zA-Z0-9]*$' 。

@hcsp-bot

Copy link
Copy Markdown
Contributor

你的提交 2dde76f ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

1 similar comment
@hcsp-bot

Copy link
Copy Markdown
Contributor

你的提交 2dde76f ,似乎失败了:Your tests failed on CircleCI

😅 请不要气馁,仔细分析原因,再接再厉!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants