From 6590c316e73aa65fc4d2db20fb728be2b8f5160e Mon Sep 17 00:00:00 2001 From: liningrui Date: Tue, 24 Jul 2018 14:32:42 +0800 Subject: [PATCH] HugeGraph-1343: Publish other modules to maven central respority Change-Id: I86373e413e9462bc915e2bb8f2bd3fac2d4a9ae8 --- .../backend/store/mysql/MysqlSessions.java | 1 + .../backend/store/mysql/WhereBuilder.java | 27 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java index 7c36099c4..6a7e64e2b 100644 --- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java +++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/MysqlSessions.java @@ -62,6 +62,7 @@ public class MysqlSessions extends BackendSessionPool { /** * Try connect with specified database, will not reconnect if failed + * @throws SQLException if a database access error occurs */ public void tryOpen() throws SQLException { Connection conn = null; diff --git a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java index 23841dcfa..9e7998648 100644 --- a/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java +++ b/hugegraph-mysql/src/main/java/com/baidu/hugegraph/backend/store/mysql/WhereBuilder.java @@ -41,6 +41,8 @@ public class WhereBuilder { /** * Concat as: key1 = value and key2 = value... + * @param keys the keys to be concatted with value + * @param value the value to be concatted with every key */ public void and(List keys, String value) { this.and(keys, " = ", value); @@ -48,6 +50,9 @@ public class WhereBuilder { /** * Concat as: key1 op value and key2 op value... + * @param keys the keys to be concatted with value + * @param operator the operator to link every key and value pair + * @param value the value to be concatted with every key */ public void and(List keys, String operator, String value) { for (int i = 0, n = keys.size(); i < n; i++) { @@ -62,6 +67,10 @@ public class WhereBuilder { /** * Concat as: key1 = value1 and key2 = value2... + * @param keys the keys to be concatted with values according to the + * same index + * @param values the values to be concatted with every keys according to + * the same index */ public void and(List keys, List values) { this.and(keys, " = ", values); @@ -69,6 +78,11 @@ public class WhereBuilder { /** * Concat as: key1 op value1 and key2 op value2... + * @param keys the keys to be concatted with values according to the + * same index + * @param operator the operator to link every key and value pair + * @param values the values to be concatted with every keys according to + * the same index */ public void and(List keys, String operator, List values) { E.checkArgument(keys.size() == values.size(), @@ -93,6 +107,12 @@ public class WhereBuilder { /** * Concat as: key1 op1 value1 and key2 op2 value2... + * @param keys the keys to be concatted with values according to the + * same index + * @param operators the operators to link every key and value pair + * according to the same index + * @param values the values to be concatted with every keys according to + * the same index */ public void and(List keys, List operators, @@ -123,6 +143,7 @@ public class WhereBuilder { /** * Concat as: clause1 and clause2... + * @param clauses the clauses to be concatted with 'AND' operator */ public void and(List clauses) { E.checkArgument(clauses != null && !clauses.isEmpty(), @@ -140,6 +161,8 @@ public class WhereBuilder { /** * Concat as: key in (value1, value2...) + * @param key the key to be concatted with 'IN' operator + * @param values the values to be concated with ',' and wappred by '()' */ public void in(String key, List values) { this.builder.append(key).append(" IN ("); @@ -158,7 +181,9 @@ public class WhereBuilder { } /** - * Concat as: (key1, key2...keyn) >= (val1, val2...valn) + * Concat as: (key1, key2...keyn) {@code >=} (val1, val2...valn) + * @param keys the keys to be concatted with {@code >=} operator + * @param values the values to be concatted with {@code >=} operator */ public void gte(List keys, List values) { E.checkArgument(keys.size() == values.size(),