id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
125,000
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/util/ExtractorUtils.java
ExtractorUtils.findFirstChildNodeNoneRecursive
public static Optional<ParserRuleContext> findFirstChildNodeNoneRecursive(final ParserRuleContext node, final RuleName ruleName) { if (isMatchedNode(node, ruleName)) { return Optional.of(node); } for (int i = 0; i < node.getChildCount(); i++) { if (node.getChild(i) instan...
java
public static Optional<ParserRuleContext> findFirstChildNodeNoneRecursive(final ParserRuleContext node, final RuleName ruleName) { if (isMatchedNode(node, ruleName)) { return Optional.of(node); } for (int i = 0; i < node.getChildCount(); i++) { if (node.getChild(i) instan...
[ "public", "static", "Optional", "<", "ParserRuleContext", ">", "findFirstChildNodeNoneRecursive", "(", "final", "ParserRuleContext", "node", ",", "final", "RuleName", "ruleName", ")", "{", "if", "(", "isMatchedNode", "(", "node", ",", "ruleName", ")", ")", "{", ...
Find first child node none recursive. @param node start node @param ruleName rule name @return matched node
[ "Find", "first", "child", "node", "none", "recursive", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/util/ExtractorUtils.java#L83-L96
125,001
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/util/ExtractorUtils.java
ExtractorUtils.findSingleNodeFromFirstDescendant
public static Optional<ParserRuleContext> findSingleNodeFromFirstDescendant(final ParserRuleContext node, final RuleName ruleName) { ParserRuleContext nextNode = node; do { if (isMatchedNode(nextNode, ruleName)) { return Optional.of(nextNode); } if (1 ...
java
public static Optional<ParserRuleContext> findSingleNodeFromFirstDescendant(final ParserRuleContext node, final RuleName ruleName) { ParserRuleContext nextNode = node; do { if (isMatchedNode(nextNode, ruleName)) { return Optional.of(nextNode); } if (1 ...
[ "public", "static", "Optional", "<", "ParserRuleContext", ">", "findSingleNodeFromFirstDescendant", "(", "final", "ParserRuleContext", "node", ",", "final", "RuleName", "ruleName", ")", "{", "ParserRuleContext", "nextNode", "=", "node", ";", "do", "{", "if", "(", ...
Find single node from first descendant which only has one child. @param node start node @param ruleName rule name @return matched node
[ "Find", "single", "node", "from", "first", "descendant", "which", "only", "has", "one", "child", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/util/ExtractorUtils.java#L105-L117
125,002
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/util/ExtractorUtils.java
ExtractorUtils.getAllDescendantNodes
public static Collection<ParserRuleContext> getAllDescendantNodes(final ParserRuleContext node, final RuleName ruleName) { Collection<ParserRuleContext> result = new LinkedList<>(); if (isMatchedNode(node, ruleName)) { result.add(node); } for (ParserRuleContext each : getChil...
java
public static Collection<ParserRuleContext> getAllDescendantNodes(final ParserRuleContext node, final RuleName ruleName) { Collection<ParserRuleContext> result = new LinkedList<>(); if (isMatchedNode(node, ruleName)) { result.add(node); } for (ParserRuleContext each : getChil...
[ "public", "static", "Collection", "<", "ParserRuleContext", ">", "getAllDescendantNodes", "(", "final", "ParserRuleContext", "node", ",", "final", "RuleName", "ruleName", ")", "{", "Collection", "<", "ParserRuleContext", ">", "result", "=", "new", "LinkedList", "<>"...
Get all descendant nodes. @param node start node @param ruleName rule name @return all descendant nodes
[ "Get", "all", "descendant", "nodes", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/util/ExtractorUtils.java#L126-L135
125,003
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/table/ShardingTableMetaData.java
ShardingTableMetaData.containsColumn
public boolean containsColumn(final String tableName, final String column) { return containsTable(tableName) && tables.get(tableName).getColumns().keySet().contains(column.toLowerCase()); }
java
public boolean containsColumn(final String tableName, final String column) { return containsTable(tableName) && tables.get(tableName).getColumns().keySet().contains(column.toLowerCase()); }
[ "public", "boolean", "containsColumn", "(", "final", "String", "tableName", ",", "final", "String", "column", ")", "{", "return", "containsTable", "(", "tableName", ")", "&&", "tables", ".", "get", "(", "tableName", ")", ".", "getColumns", "(", ")", ".", "...
Judge contains column from table meta data or not. @param tableName table name @param column column @return contains column from table meta data or not
[ "Judge", "contains", "column", "from", "table", "meta", "data", "or", "not", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/table/ShardingTableMetaData.java#L85-L87
125,004
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/table/ShardingTableMetaData.java
ShardingTableMetaData.getAllColumnNames
public Collection<String> getAllColumnNames(final String tableName) { return tables.containsKey(tableName) ? tables.get(tableName).getColumns().keySet() : Collections.<String>emptyList(); }
java
public Collection<String> getAllColumnNames(final String tableName) { return tables.containsKey(tableName) ? tables.get(tableName).getColumns().keySet() : Collections.<String>emptyList(); }
[ "public", "Collection", "<", "String", ">", "getAllColumnNames", "(", "final", "String", "tableName", ")", "{", "return", "tables", ".", "containsKey", "(", "tableName", ")", "?", "tables", ".", "get", "(", "tableName", ")", ".", "getColumns", "(", ")", "....
Get all column names via table. @param tableName table name @return column names
[ "Get", "all", "column", "names", "via", "table", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/metadata/table/ShardingTableMetaData.java#L95-L97
125,005
apache/incubator-shardingsphere
sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/dql/groupby/aggregation/AggregationUnitFactory.java
AggregationUnitFactory.create
public static AggregationUnit create(final AggregationType type) { switch (type) { case MAX: return new ComparableAggregationUnit(false); case MIN: return new ComparableAggregationUnit(true); case SUM: case COUNT: re...
java
public static AggregationUnit create(final AggregationType type) { switch (type) { case MAX: return new ComparableAggregationUnit(false); case MIN: return new ComparableAggregationUnit(true); case SUM: case COUNT: re...
[ "public", "static", "AggregationUnit", "create", "(", "final", "AggregationType", "type", ")", "{", "switch", "(", "type", ")", "{", "case", "MAX", ":", "return", "new", "ComparableAggregationUnit", "(", "false", ")", ";", "case", "MIN", ":", "return", "new"...
Create aggregation unit instance. @param type aggregation function type @return aggregation unit instance
[ "Create", "aggregation", "unit", "instance", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/dql/groupby/aggregation/AggregationUnitFactory.java#L38-L52
125,006
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/executor/ForceExecuteTemplate.java
ForceExecuteTemplate.execute
public void execute(final Collection<T> targets, final ForceExecuteCallback<T> callback) throws SQLException { Collection<SQLException> exceptions = new LinkedList<>(); for (T each : targets) { try { callback.execute(each); } catch (final SQLException ex) { ...
java
public void execute(final Collection<T> targets, final ForceExecuteCallback<T> callback) throws SQLException { Collection<SQLException> exceptions = new LinkedList<>(); for (T each : targets) { try { callback.execute(each); } catch (final SQLException ex) { ...
[ "public", "void", "execute", "(", "final", "Collection", "<", "T", ">", "targets", ",", "final", "ForceExecuteCallback", "<", "T", ">", "callback", ")", "throws", "SQLException", "{", "Collection", "<", "SQLException", ">", "exceptions", "=", "new", "LinkedLis...
Force execute. @param targets targets to be executed @param callback force execute callback @throws SQLException throw SQL exception after all targets are executed
[ "Force", "execute", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/executor/ForceExecuteTemplate.java#L40-L50
125,007
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/spi/algorithm/TypeBasedSPIServiceLoader.java
TypeBasedSPIServiceLoader.newService
public final T newService(final String type, final Properties props) { Collection<T> typeBasedServices = loadTypeBasedServices(type); if (typeBasedServices.isEmpty()) { throw new ShardingConfigurationException("Invalid `%s` SPI type `%s`.", classType.getName(), type); } T res...
java
public final T newService(final String type, final Properties props) { Collection<T> typeBasedServices = loadTypeBasedServices(type); if (typeBasedServices.isEmpty()) { throw new ShardingConfigurationException("Invalid `%s` SPI type `%s`.", classType.getName(), type); } T res...
[ "public", "final", "T", "newService", "(", "final", "String", "type", ",", "final", "Properties", "props", ")", "{", "Collection", "<", "T", ">", "typeBasedServices", "=", "loadTypeBasedServices", "(", "type", ")", ";", "if", "(", "typeBasedServices", ".", "...
Create new instance for type based SPI. @param type SPI type @param props SPI properties @return SPI instance
[ "Create", "new", "instance", "for", "type", "based", "SPI", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/spi/algorithm/TypeBasedSPIServiceLoader.java#L50-L58
125,008
apache/incubator-shardingsphere
sharding-opentracing/src/main/java/org/apache/shardingsphere/opentracing/hook/ShardingErrorSpan.java
ShardingErrorSpan.setError
public static void setError(final Span span, final Exception cause) { span.setTag(Tags.ERROR.getKey(), true).log(System.currentTimeMillis(), getReason(cause)); }
java
public static void setError(final Span span, final Exception cause) { span.setTag(Tags.ERROR.getKey(), true).log(System.currentTimeMillis(), getReason(cause)); }
[ "public", "static", "void", "setError", "(", "final", "Span", "span", ",", "final", "Exception", "cause", ")", "{", "span", ".", "setTag", "(", "Tags", ".", "ERROR", ".", "getKey", "(", ")", ",", "true", ")", ".", "log", "(", "System", ".", "currentT...
Set error. @param span span to be set @param cause failure cause of span
[ "Set", "error", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-opentracing/src/main/java/org/apache/shardingsphere/opentracing/hook/ShardingErrorSpan.java#L43-L45
125,009
apache/incubator-shardingsphere
sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/router/sharding/ShardingRouterFactory.java
ShardingRouterFactory.newInstance
public static ShardingRouter newInstance(final ShardingRule shardingRule, final ShardingMetaData shardingMetaData, final DatabaseType databaseType, final ParsingResultCache parsingResultCache) { return HintManager.isDatabaseShardingOnly() ? new DatabaseHintSQLRouter(shardingRule) : new ParsingSQ...
java
public static ShardingRouter newInstance(final ShardingRule shardingRule, final ShardingMetaData shardingMetaData, final DatabaseType databaseType, final ParsingResultCache parsingResultCache) { return HintManager.isDatabaseShardingOnly() ? new DatabaseHintSQLRouter(shardingRule) : new ParsingSQ...
[ "public", "static", "ShardingRouter", "newInstance", "(", "final", "ShardingRule", "shardingRule", ",", "final", "ShardingMetaData", "shardingMetaData", ",", "final", "DatabaseType", "databaseType", ",", "final", "ParsingResultCache", "parsingResultCache", ")", "{", "retu...
Create new instance of sharding router. @param shardingRule sharding rule @param shardingMetaData sharding meta data @param databaseType database type @param parsingResultCache parsing result cache @return sharding router instance
[ "Create", "new", "instance", "of", "sharding", "router", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/router/sharding/ShardingRouterFactory.java#L46-L49
125,010
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/SQLExecuteCallbackFactory.java
SQLExecuteCallbackFactory.getPreparedUpdateSQLExecuteCallback
public static SQLExecuteCallback<Integer> getPreparedUpdateSQLExecuteCallback(final DatabaseType databaseType, final boolean isExceptionThrown) { return new SQLExecuteCallback<Integer>(databaseType, isExceptionThrown) { @Override protected Integer executeSQL(final RouteUnit ...
java
public static SQLExecuteCallback<Integer> getPreparedUpdateSQLExecuteCallback(final DatabaseType databaseType, final boolean isExceptionThrown) { return new SQLExecuteCallback<Integer>(databaseType, isExceptionThrown) { @Override protected Integer executeSQL(final RouteUnit ...
[ "public", "static", "SQLExecuteCallback", "<", "Integer", ">", "getPreparedUpdateSQLExecuteCallback", "(", "final", "DatabaseType", "databaseType", ",", "final", "boolean", "isExceptionThrown", ")", "{", "return", "new", "SQLExecuteCallback", "<", "Integer", ">", "(", ...
Get update callback. @param databaseType database type @param isExceptionThrown is exception thrown @return update callback
[ "Get", "update", "callback", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/SQLExecuteCallbackFactory.java#L43-L51
125,011
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/SQLExecuteCallbackFactory.java
SQLExecuteCallbackFactory.getPreparedSQLExecuteCallback
public static SQLExecuteCallback<Boolean> getPreparedSQLExecuteCallback(final DatabaseType databaseType, final boolean isExceptionThrown) { return new SQLExecuteCallback<Boolean>(databaseType, isExceptionThrown) { @Override protected Boolean executeSQL(final RouteUnit routeU...
java
public static SQLExecuteCallback<Boolean> getPreparedSQLExecuteCallback(final DatabaseType databaseType, final boolean isExceptionThrown) { return new SQLExecuteCallback<Boolean>(databaseType, isExceptionThrown) { @Override protected Boolean executeSQL(final RouteUnit routeU...
[ "public", "static", "SQLExecuteCallback", "<", "Boolean", ">", "getPreparedSQLExecuteCallback", "(", "final", "DatabaseType", "databaseType", ",", "final", "boolean", "isExceptionThrown", ")", "{", "return", "new", "SQLExecuteCallback", "<", "Boolean", ">", "(", "data...
Get execute callback. @param databaseType database type @param isExceptionThrown is exception thrown @return execute callback
[ "Get", "execute", "callback", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/executor/SQLExecuteCallbackFactory.java#L60-L68
125,012
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/BindingTableRule.java
BindingTableRule.hasLogicTable
public boolean hasLogicTable(final String logicTableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equals(logicTableName.toLowerCase())) { return true; } } return false; }
java
public boolean hasLogicTable(final String logicTableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equals(logicTableName.toLowerCase())) { return true; } } return false; }
[ "public", "boolean", "hasLogicTable", "(", "final", "String", "logicTableName", ")", "{", "for", "(", "TableRule", "each", ":", "tableRules", ")", "{", "if", "(", "each", ".", "getLogicTable", "(", ")", ".", "equals", "(", "logicTableName", ".", "toLowerCase...
Judge contains this logic table in this rule. @param logicTableName logic table name @return contains this logic table or not
[ "Judge", "contains", "this", "logic", "table", "in", "this", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/BindingTableRule.java#L48-L55
125,013
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/BindingTableRule.java
BindingTableRule.getBindingActualTable
public String getBindingActualTable(final String dataSource, final String logicTable, final String otherActualTable) { int index = -1; for (TableRule each : tableRules) { index = each.findActualTableIndex(dataSource, otherActualTable); if (-1 != index) { break; ...
java
public String getBindingActualTable(final String dataSource, final String logicTable, final String otherActualTable) { int index = -1; for (TableRule each : tableRules) { index = each.findActualTableIndex(dataSource, otherActualTable); if (-1 != index) { break; ...
[ "public", "String", "getBindingActualTable", "(", "final", "String", "dataSource", ",", "final", "String", "logicTable", ",", "final", "String", "otherActualTable", ")", "{", "int", "index", "=", "-", "1", ";", "for", "(", "TableRule", "each", ":", "tableRules...
Deduce actual table name from other actual table name in same binding table rule. @param dataSource data source name @param logicTable logic table name @param otherActualTable other actual table name in same binding table rule @return actual table name
[ "Deduce", "actual", "table", "name", "from", "other", "actual", "table", "name", "in", "same", "binding", "table", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/BindingTableRule.java#L65-L82
125,014
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/clause/GroupByClauseParser.java
GroupByClauseParser.parse
public final void parse(final SelectStatement selectStatement) { if (!lexerEngine.skipIfEqual(DefaultKeyword.GROUP)) { return; } lexerEngine.accept(DefaultKeyword.BY); while (true) { addGroupByItem(basicExpressionParser.parse(selectStatement), selectStatement); ...
java
public final void parse(final SelectStatement selectStatement) { if (!lexerEngine.skipIfEqual(DefaultKeyword.GROUP)) { return; } lexerEngine.accept(DefaultKeyword.BY); while (true) { addGroupByItem(basicExpressionParser.parse(selectStatement), selectStatement); ...
[ "public", "final", "void", "parse", "(", "final", "SelectStatement", "selectStatement", ")", "{", "if", "(", "!", "lexerEngine", ".", "skipIfEqual", "(", "DefaultKeyword", ".", "GROUP", ")", ")", "{", "return", ";", "}", "lexerEngine", ".", "accept", "(", ...
Parse group by. @param selectStatement select statement
[ "Parse", "group", "by", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/clause/GroupByClauseParser.java#L58-L72
125,015
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dal/use/UseParserFactory.java
UseParserFactory.newInstance
public static AbstractUseParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLUseParser(lexerEngine); default: throw new Unsupport...
java
public static AbstractUseParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLUseParser(lexerEngine); default: throw new Unsupport...
[ "public", "static", "AbstractUseParser", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "LexerEngine", "lexerEngine", ")", "{", "switch", "(", "dbType", ")", "{", "case", "H2", ":", "case", "MyS...
Create use parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine. @return use parser instance
[ "Create", "use", "parser", "instance", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dal/use/UseParserFactory.java#L43-L51
125,016
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.readIntLenenc
public long readIntLenenc() { int firstByte = readInt1(); if (firstByte < 0xfb) { return firstByte; } if (0xfb == firstByte) { return 0; } if (0xfc == firstByte) { return byteBuf.readShortLE(); } if (0xfd == firstByte) {...
java
public long readIntLenenc() { int firstByte = readInt1(); if (firstByte < 0xfb) { return firstByte; } if (0xfb == firstByte) { return 0; } if (0xfc == firstByte) { return byteBuf.readShortLE(); } if (0xfd == firstByte) {...
[ "public", "long", "readIntLenenc", "(", ")", "{", "int", "firstByte", "=", "readInt1", "(", ")", ";", "if", "(", "firstByte", "<", "0xfb", ")", "{", "return", "firstByte", ";", "}", "if", "(", "0xfb", "==", "firstByte", ")", "{", "return", "0", ";", ...
Read lenenc integer from byte buffers. @see <a href="https://dev.mysql.com/doc/internals/en/integer.html#packet-Protocol::LengthEncodedInteger">LengthEncodedInteger</a> @return lenenc integer
[ "Read", "lenenc", "integer", "from", "byte", "buffers", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L183-L198
125,017
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.writeIntLenenc
public void writeIntLenenc(final long value) { if (value < 0xfb) { byteBuf.writeByte((int) value); return; } if (value < Math.pow(2, 16)) { byteBuf.writeByte(0xfc); byteBuf.writeShortLE((int) value); return; } if (value ...
java
public void writeIntLenenc(final long value) { if (value < 0xfb) { byteBuf.writeByte((int) value); return; } if (value < Math.pow(2, 16)) { byteBuf.writeByte(0xfc); byteBuf.writeShortLE((int) value); return; } if (value ...
[ "public", "void", "writeIntLenenc", "(", "final", "long", "value", ")", "{", "if", "(", "value", "<", "0xfb", ")", "{", "byteBuf", ".", "writeByte", "(", "(", "int", ")", "value", ")", ";", "return", ";", "}", "if", "(", "value", "<", "Math", ".", ...
Write lenenc integer to byte buffers. @see <a href="https://dev.mysql.com/doc/internals/en/integer.html#packet-Protocol::LengthEncodedInteger">LengthEncodedInteger</a> @param value lenenc integer
[ "Write", "lenenc", "integer", "to", "byte", "buffers", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L207-L224
125,018
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.readStringLenenc
public String readStringLenenc() { int length = (int) readIntLenenc(); byte[] result = new byte[length]; byteBuf.readBytes(result); return new String(result); }
java
public String readStringLenenc() { int length = (int) readIntLenenc(); byte[] result = new byte[length]; byteBuf.readBytes(result); return new String(result); }
[ "public", "String", "readStringLenenc", "(", ")", "{", "int", "length", "=", "(", "int", ")", "readIntLenenc", "(", ")", ";", "byte", "[", "]", "result", "=", "new", "byte", "[", "length", "]", ";", "byteBuf", ".", "readBytes", "(", "result", ")", ";...
Read lenenc string from byte buffers. @see <a href="https://dev.mysql.com/doc/internals/en/string.html#packet-Protocol::FixedLengthString">FixedLengthString</a> @return lenenc string
[ "Read", "lenenc", "string", "from", "byte", "buffers", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L233-L238
125,019
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.writeStringLenenc
public void writeStringLenenc(final String value) { if (Strings.isNullOrEmpty(value)) { byteBuf.writeByte(0); return; } writeIntLenenc(value.getBytes().length); byteBuf.writeBytes(value.getBytes()); }
java
public void writeStringLenenc(final String value) { if (Strings.isNullOrEmpty(value)) { byteBuf.writeByte(0); return; } writeIntLenenc(value.getBytes().length); byteBuf.writeBytes(value.getBytes()); }
[ "public", "void", "writeStringLenenc", "(", "final", "String", "value", ")", "{", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "value", ")", ")", "{", "byteBuf", ".", "writeByte", "(", "0", ")", ";", "return", ";", "}", "writeIntLenenc", "(", "value"...
Write lenenc string to byte buffers. @see <a href="https://dev.mysql.com/doc/internals/en/string.html#packet-Protocol::FixedLengthString">FixedLengthString</a> @param value fixed length string
[ "Write", "lenenc", "string", "to", "byte", "buffers", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L261-L268
125,020
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.writeBytesLenenc
public void writeBytesLenenc(final byte[] value) { if (0 == value.length) { byteBuf.writeByte(0); return; } writeIntLenenc(value.length); byteBuf.writeBytes(value); }
java
public void writeBytesLenenc(final byte[] value) { if (0 == value.length) { byteBuf.writeByte(0); return; } writeIntLenenc(value.length); byteBuf.writeBytes(value); }
[ "public", "void", "writeBytesLenenc", "(", "final", "byte", "[", "]", "value", ")", "{", "if", "(", "0", "==", "value", ".", "length", ")", "{", "byteBuf", ".", "writeByte", "(", "0", ")", ";", "return", ";", "}", "writeIntLenenc", "(", "value", ".",...
Write lenenc bytes to byte buffers. @param value fixed length bytes
[ "Write", "lenenc", "bytes", "to", "byte", "buffers", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L275-L282
125,021
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.readStringFix
public String readStringFix(final int length) { byte[] result = new byte[length]; byteBuf.readBytes(result); return new String(result); }
java
public String readStringFix(final int length) { byte[] result = new byte[length]; byteBuf.readBytes(result); return new String(result); }
[ "public", "String", "readStringFix", "(", "final", "int", "length", ")", "{", "byte", "[", "]", "result", "=", "new", "byte", "[", "length", "]", ";", "byteBuf", ".", "readBytes", "(", "result", ")", ";", "return", "new", "String", "(", "result", ")", ...
Read fixed length string from byte buffers. @see <a href="https://dev.mysql.com/doc/internals/en/string.html#packet-Protocol::FixedLengthString">FixedLengthString</a> @param length length of fixed string @return fixed length string
[ "Read", "fixed", "length", "string", "from", "byte", "buffers", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L293-L297
125,022
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.readStringNulByBytes
public byte[] readStringNulByBytes() { byte[] result = new byte[byteBuf.bytesBefore((byte) 0)]; byteBuf.readBytes(result); byteBuf.skipBytes(1); return result; }
java
public byte[] readStringNulByBytes() { byte[] result = new byte[byteBuf.bytesBefore((byte) 0)]; byteBuf.readBytes(result); byteBuf.skipBytes(1); return result; }
[ "public", "byte", "[", "]", "readStringNulByBytes", "(", ")", "{", "byte", "[", "]", "result", "=", "new", "byte", "[", "byteBuf", ".", "bytesBefore", "(", "(", "byte", ")", "0", ")", "]", ";", "byteBuf", ".", "readBytes", "(", "result", ")", ";", ...
Read null terminated string from byte buffers and return bytes. @see <a href="https://dev.mysql.com/doc/internals/en/string.html#packet-Protocol::NulTerminatedString">NulTerminatedString</a> @return null terminated bytes
[ "Read", "null", "terminated", "string", "from", "byte", "buffers", "and", "return", "bytes", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L380-L385
125,023
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java
MySQLPacketPayload.readStringEOF
public String readStringEOF() { byte[] result = new byte[byteBuf.readableBytes()]; byteBuf.readBytes(result); return new String(result); }
java
public String readStringEOF() { byte[] result = new byte[byteBuf.readableBytes()]; byteBuf.readBytes(result); return new String(result); }
[ "public", "String", "readStringEOF", "(", ")", "{", "byte", "[", "]", "result", "=", "new", "byte", "[", "byteBuf", ".", "readableBytes", "(", ")", "]", ";", "byteBuf", ".", "readBytes", "(", "result", ")", ";", "return", "new", "String", "(", "result"...
Read rest of packet string from byte buffers. @see <a href="https://dev.mysql.com/doc/internals/en/string.html#packet-Protocol::RestOfPacketString">RestOfPacketString</a> @return rest of packet string
[ "Read", "rest", "of", "packet", "string", "from", "byte", "buffers", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/payload/MySQLPacketPayload.java#L406-L410
125,024
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/AndCondition.java
AndCondition.getConditionsMap
public Map<Column, List<Condition>> getConditionsMap() { Map<Column, List<Condition>> result = new LinkedHashMap<>(conditions.size(), 1); for (Condition each : conditions) { if (!result.containsKey(each.getColumn())) { result.put(each.getColumn(), new LinkedList<Condition>())...
java
public Map<Column, List<Condition>> getConditionsMap() { Map<Column, List<Condition>> result = new LinkedHashMap<>(conditions.size(), 1); for (Condition each : conditions) { if (!result.containsKey(each.getColumn())) { result.put(each.getColumn(), new LinkedList<Condition>())...
[ "public", "Map", "<", "Column", ",", "List", "<", "Condition", ">", ">", "getConditionsMap", "(", ")", "{", "Map", "<", "Column", ",", "List", "<", "Condition", ">", ">", "result", "=", "new", "LinkedHashMap", "<>", "(", "conditions", ".", "size", "(",...
Get conditions map. @return conditions map
[ "Get", "conditions", "map", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/AndCondition.java#L45-L54
125,025
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/AndCondition.java
AndCondition.optimize
public AndCondition optimize() { AndCondition result = new AndCondition(); for (Condition each : conditions) { if (Condition.class.equals(each.getClass())) { result.getConditions().add(each); } } if (result.getConditions().isEmpty()) { ...
java
public AndCondition optimize() { AndCondition result = new AndCondition(); for (Condition each : conditions) { if (Condition.class.equals(each.getClass())) { result.getConditions().add(each); } } if (result.getConditions().isEmpty()) { ...
[ "public", "AndCondition", "optimize", "(", ")", "{", "AndCondition", "result", "=", "new", "AndCondition", "(", ")", ";", "for", "(", "Condition", "each", ":", "conditions", ")", "{", "if", "(", "Condition", ".", "class", ".", "equals", "(", "each", ".",...
Optimize and condition. @return and condition
[ "Optimize", "and", "condition", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/AndCondition.java#L61-L72
125,026
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/rule/registry/statement/SQLStatementRuleDefinition.java
SQLStatementRuleDefinition.init
@SuppressWarnings("unchecked") @SneakyThrows public void init(final SQLStatementRuleDefinitionEntity dialectRuleDefinitionEntity, final ExtractorRuleDefinition extractorRuleDefinition) { for (SQLStatementRuleEntity each : dialectRuleDefinitionEntity.getRules()) { SQLStatementRule sqlStatemen...
java
@SuppressWarnings("unchecked") @SneakyThrows public void init(final SQLStatementRuleDefinitionEntity dialectRuleDefinitionEntity, final ExtractorRuleDefinition extractorRuleDefinition) { for (SQLStatementRuleEntity each : dialectRuleDefinitionEntity.getRules()) { SQLStatementRule sqlStatemen...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "SneakyThrows", "public", "void", "init", "(", "final", "SQLStatementRuleDefinitionEntity", "dialectRuleDefinitionEntity", ",", "final", "ExtractorRuleDefinition", "extractorRuleDefinition", ")", "{", "for", "(", "S...
Initialize SQL statement rule definition. @param dialectRuleDefinitionEntity SQL dialect statement rule definition entity @param extractorRuleDefinition extractor rule definition
[ "Initialize", "SQL", "statement", "rule", "definition", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/rule/registry/statement/SQLStatementRuleDefinition.java#L53-L63
125,027
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-core/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/bootstrap/ShardingProxy.java
ShardingProxy.start
@SneakyThrows public void start(final int port) { try { ServerBootstrap bootstrap = new ServerBootstrap(); bossGroup = createEventLoopGroup(); if (bossGroup instanceof EpollEventLoopGroup) { groupsEpoll(bootstrap); } else { grou...
java
@SneakyThrows public void start(final int port) { try { ServerBootstrap bootstrap = new ServerBootstrap(); bossGroup = createEventLoopGroup(); if (bossGroup instanceof EpollEventLoopGroup) { groupsEpoll(bootstrap); } else { grou...
[ "@", "SneakyThrows", "public", "void", "start", "(", "final", "int", "port", ")", "{", "try", "{", "ServerBootstrap", "bootstrap", "=", "new", "ServerBootstrap", "(", ")", ";", "bossGroup", "=", "createEventLoopGroup", "(", ")", ";", "if", "(", "bossGroup", ...
Start Sharding-Proxy. @param port port
[ "Start", "Sharding", "-", "Proxy", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-frontend/sharding-proxy-frontend-core/src/main/java/org/apache/shardingsphere/shardingproxy/frontend/bootstrap/ShardingProxy.java#L72-L89
125,028
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/listener/ConfigurationChangedListenerManager.java
ConfigurationChangedListenerManager.initListeners
public void initListeners() { schemaChangedListener.watch(ChangedType.UPDATED, ChangedType.DELETED); propertiesChangedListener.watch(ChangedType.UPDATED); authenticationChangedListener.watch(ChangedType.UPDATED); }
java
public void initListeners() { schemaChangedListener.watch(ChangedType.UPDATED, ChangedType.DELETED); propertiesChangedListener.watch(ChangedType.UPDATED); authenticationChangedListener.watch(ChangedType.UPDATED); }
[ "public", "void", "initListeners", "(", ")", "{", "schemaChangedListener", ".", "watch", "(", "ChangedType", ".", "UPDATED", ",", "ChangedType", ".", "DELETED", ")", ";", "propertiesChangedListener", ".", "watch", "(", "ChangedType", ".", "UPDATED", ")", ";", ...
Initialize all configuration changed listeners.
[ "Initialize", "all", "configuration", "changed", "listeners", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/listener/ConfigurationChangedListenerManager.java#L48-L52
125,029
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/internal/datasource/OrchestrationMasterSlaveDataSource.java
OrchestrationMasterSlaveDataSource.renew
@Subscribe @SneakyThrows public final synchronized void renew(final DataSourceChangedEvent dataSourceChangedEvent) { dataSource.close(); dataSource = new MasterSlaveDataSource( DataSourceConverter.getDataSourceMap(dataSourceChangedEvent.getDataSourceConfigurations()), dataSource....
java
@Subscribe @SneakyThrows public final synchronized void renew(final DataSourceChangedEvent dataSourceChangedEvent) { dataSource.close(); dataSource = new MasterSlaveDataSource( DataSourceConverter.getDataSourceMap(dataSourceChangedEvent.getDataSourceConfigurations()), dataSource....
[ "@", "Subscribe", "@", "SneakyThrows", "public", "final", "synchronized", "void", "renew", "(", "final", "DataSourceChangedEvent", "dataSourceChangedEvent", ")", "{", "dataSource", ".", "close", "(", ")", ";", "dataSource", "=", "new", "MasterSlaveDataSource", "(", ...
Renew master-slave data source. @param dataSourceChangedEvent data source changed event
[ "Renew", "master", "-", "slave", "data", "source", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-orchestration/src/main/java/org/apache/shardingsphere/shardingjdbc/orchestration/internal/datasource/OrchestrationMasterSlaveDataSource.java#L102-L108
125,030
apache/incubator-shardingsphere
sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/dql/orderby/CompareUtil.java
CompareUtil.compareTo
@SuppressWarnings({ "rawtypes", "unchecked" }) public static int compareTo(final Comparable thisValue, final Comparable otherValue, final OrderDirection orderDirection, final OrderDirection nullOrderDirection) { if (null == thisValue && null == otherValue) { return 0; } if (null ...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) public static int compareTo(final Comparable thisValue, final Comparable otherValue, final OrderDirection orderDirection, final OrderDirection nullOrderDirection) { if (null == thisValue && null == otherValue) { return 0; } if (null ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "public", "static", "int", "compareTo", "(", "final", "Comparable", "thisValue", ",", "final", "Comparable", "otherValue", ",", "final", "OrderDirection", "orderDirection", ",", "fi...
Compare two object with order type. @param thisValue this value @param otherValue other value @param orderDirection order direction @param nullOrderDirection order direction for null value @return compare result
[ "Compare", "two", "object", "with", "order", "type", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/dql/orderby/CompareUtil.java#L41-L53
125,031
apache/incubator-shardingsphere
sharding-transaction/sharding-transaction-2pc/sharding-transaction-xa/sharding-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/XAPropertiesFactory.java
XAPropertiesFactory.createXAProperties
public static XAProperties createXAProperties(final DatabaseType databaseType) { switch (databaseType) { case H2: return new H2XAProperties(); case MySQL: return new MySQLXAProperties(); case PostgreSQL: return new PostgreSQLXAP...
java
public static XAProperties createXAProperties(final DatabaseType databaseType) { switch (databaseType) { case H2: return new H2XAProperties(); case MySQL: return new MySQLXAProperties(); case PostgreSQL: return new PostgreSQLXAP...
[ "public", "static", "XAProperties", "createXAProperties", "(", "final", "DatabaseType", "databaseType", ")", "{", "switch", "(", "databaseType", ")", "{", "case", "H2", ":", "return", "new", "H2XAProperties", "(", ")", ";", "case", "MySQL", ":", "return", "new...
Create XA properties. @param databaseType database type @return XA properties
[ "Create", "XA", "properties", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-transaction/sharding-transaction-2pc/sharding-transaction-xa/sharding-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/properties/XAPropertiesFactory.java#L43-L58
125,032
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/OrCondition.java
OrCondition.add
public void add(final Condition condition) { if (andConditions.isEmpty()) { andConditions.add(new AndCondition()); } andConditions.get(0).getConditions().add(condition); }
java
public void add(final Condition condition) { if (andConditions.isEmpty()) { andConditions.add(new AndCondition()); } andConditions.get(0).getConditions().add(condition); }
[ "public", "void", "add", "(", "final", "Condition", "condition", ")", "{", "if", "(", "andConditions", ".", "isEmpty", "(", ")", ")", "{", "andConditions", ".", "add", "(", "new", "AndCondition", "(", ")", ")", ";", "}", "andConditions", ".", "get", "(...
Add condition. @param condition condition
[ "Add", "condition", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/OrCondition.java#L52-L57
125,033
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/OrCondition.java
OrCondition.optimize
public OrCondition optimize() { for (AndCondition each : andConditions) { if (each.getConditions().get(0) instanceof NullCondition) { OrCondition result = new OrCondition(); result.add(new NullCondition()); return result; } } ...
java
public OrCondition optimize() { for (AndCondition each : andConditions) { if (each.getConditions().get(0) instanceof NullCondition) { OrCondition result = new OrCondition(); result.add(new NullCondition()); return result; } } ...
[ "public", "OrCondition", "optimize", "(", ")", "{", "for", "(", "AndCondition", "each", ":", "andConditions", ")", "{", "if", "(", "each", ".", "getConditions", "(", ")", ".", "get", "(", "0", ")", "instanceof", "NullCondition", ")", "{", "OrCondition", ...
Optimize or condition. @return or condition
[ "Optimize", "or", "condition", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/OrCondition.java#L64-L73
125,034
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/OrCondition.java
OrCondition.findConditions
public List<Condition> findConditions(final Column column) { List<Condition> result = new LinkedList<>(); for (AndCondition each : andConditions) { result.addAll(Collections2.filter(each.getConditions(), new Predicate<Condition>() { @Override ...
java
public List<Condition> findConditions(final Column column) { List<Condition> result = new LinkedList<>(); for (AndCondition each : andConditions) { result.addAll(Collections2.filter(each.getConditions(), new Predicate<Condition>() { @Override ...
[ "public", "List", "<", "Condition", ">", "findConditions", "(", "final", "Column", "column", ")", "{", "List", "<", "Condition", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "AndCondition", "each", ":", "andConditions", ")", ...
Find conditions by column. @param column column @return conditions
[ "Find", "conditions", "by", "column", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/context/condition/OrCondition.java#L81-L93
125,035
apache/incubator-shardingsphere
sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/dal/show/ShowTablesMergedResult.java
ShowTablesMergedResult.resetColumnLabel
public void resetColumnLabel(final String schema) { Map<String, Integer> labelAndIndexMap = new HashMap<>(1, 1); labelAndIndexMap.put(schema, 1); resetLabelAndIndexMap(labelAndIndexMap); }
java
public void resetColumnLabel(final String schema) { Map<String, Integer> labelAndIndexMap = new HashMap<>(1, 1); labelAndIndexMap.put(schema, 1); resetLabelAndIndexMap(labelAndIndexMap); }
[ "public", "void", "resetColumnLabel", "(", "final", "String", "schema", ")", "{", "Map", "<", "String", ",", "Integer", ">", "labelAndIndexMap", "=", "new", "HashMap", "<>", "(", "1", ",", "1", ")", ";", "labelAndIndexMap", ".", "put", "(", "schema", ","...
Reset column label. @param schema schema
[ "Reset", "column", "label", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/dal/show/ShowTablesMergedResult.java#L53-L57
125,036
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/ddl/AlterTableStatement.java
AlterTableStatement.findColumnDefinition
public Optional<ColumnDefinitionSegment> findColumnDefinition(final String columnName, final ShardingTableMetaData shardingTableMetaData) { Optional<ColumnDefinitionSegment> result = findColumnDefinitionFromMetaData(columnName, shardingTableMetaData); return result.isPresent() ? result : findColumnDefin...
java
public Optional<ColumnDefinitionSegment> findColumnDefinition(final String columnName, final ShardingTableMetaData shardingTableMetaData) { Optional<ColumnDefinitionSegment> result = findColumnDefinitionFromMetaData(columnName, shardingTableMetaData); return result.isPresent() ? result : findColumnDefin...
[ "public", "Optional", "<", "ColumnDefinitionSegment", ">", "findColumnDefinition", "(", "final", "String", "columnName", ",", "final", "ShardingTableMetaData", "shardingTableMetaData", ")", "{", "Optional", "<", "ColumnDefinitionSegment", ">", "result", "=", "findColumnDe...
Find column definition. @param columnName column name @param shardingTableMetaData sharding table meta data @return column definition
[ "Find", "column", "definition", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/ddl/AlterTableStatement.java#L71-L74
125,037
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/ddl/AlterTableStatement.java
AlterTableStatement.findColumnDefinitionFromMetaData
public Optional<ColumnDefinitionSegment> findColumnDefinitionFromMetaData(final String columnName, final ShardingTableMetaData shardingTableMetaData) { if (!shardingTableMetaData.containsTable(getTables().getSingleTableName())) { return Optional.absent(); } for (ColumnMetaData each :...
java
public Optional<ColumnDefinitionSegment> findColumnDefinitionFromMetaData(final String columnName, final ShardingTableMetaData shardingTableMetaData) { if (!shardingTableMetaData.containsTable(getTables().getSingleTableName())) { return Optional.absent(); } for (ColumnMetaData each :...
[ "public", "Optional", "<", "ColumnDefinitionSegment", ">", "findColumnDefinitionFromMetaData", "(", "final", "String", "columnName", ",", "final", "ShardingTableMetaData", "shardingTableMetaData", ")", "{", "if", "(", "!", "shardingTableMetaData", ".", "containsTable", "(...
Find column definition from meta data. @param columnName column name @param shardingTableMetaData sharding table meta data @return column definition
[ "Find", "column", "definition", "from", "meta", "data", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/ddl/AlterTableStatement.java#L83-L93
125,038
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/SQLSegmentsExtractorEngine.java
SQLSegmentsExtractorEngine.extract
public Collection<SQLSegment> extract(final SQLAST ast) { Collection<SQLSegment> result = new LinkedList<>(); Preconditions.checkState(ast.getSQLStatementRule().isPresent()); Map<ParserRuleContext, Integer> parameterMarkerIndexes = getParameterMarkerIndexes(ast.getParserRuleContext()); f...
java
public Collection<SQLSegment> extract(final SQLAST ast) { Collection<SQLSegment> result = new LinkedList<>(); Preconditions.checkState(ast.getSQLStatementRule().isPresent()); Map<ParserRuleContext, Integer> parameterMarkerIndexes = getParameterMarkerIndexes(ast.getParserRuleContext()); f...
[ "public", "Collection", "<", "SQLSegment", ">", "extract", "(", "final", "SQLAST", "ast", ")", "{", "Collection", "<", "SQLSegment", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "Preconditions", ".", "checkState", "(", "ast", ".", "getSQLS...
Extract SQL segments. @param ast SQL AST @return SQL segments
[ "Extract", "SQL", "segments", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/extractor/SQLSegmentsExtractorEngine.java#L49-L64
125,039
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dml/select/SelectParserFactory.java
SelectParserFactory.newInstance
public static AbstractSelectParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine, final ShardingTableMetaData shardingTableMetaData) { switch (dbType) { case H2: case MySQL: return new MySQLSelectParser(shardingRule,...
java
public static AbstractSelectParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine, final ShardingTableMetaData shardingTableMetaData) { switch (dbType) { case H2: case MySQL: return new MySQLSelectParser(shardingRule,...
[ "public", "static", "AbstractSelectParser", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "LexerEngine", "lexerEngine", ",", "final", "ShardingTableMetaData", "shardingTableMetaData", ")", "{", "switch",...
Create select parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine. @param shardingTableMetaData sharding metadata. @return select parser instance
[ "Create", "select", "parser", "instance", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dml/select/SelectParserFactory.java#L48-L62
125,040
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/rule/OrchestrationMasterSlaveRule.java
OrchestrationMasterSlaveRule.getSlaveDataSourceNames
@Override public Collection<String> getSlaveDataSourceNames() { if (disabledDataSourceNames.isEmpty()) { return super.getSlaveDataSourceNames(); } Collection<String> result = new LinkedList<>(super.getSlaveDataSourceNames()); result.removeAll(disabledDataSourceNames); ...
java
@Override public Collection<String> getSlaveDataSourceNames() { if (disabledDataSourceNames.isEmpty()) { return super.getSlaveDataSourceNames(); } Collection<String> result = new LinkedList<>(super.getSlaveDataSourceNames()); result.removeAll(disabledDataSourceNames); ...
[ "@", "Override", "public", "Collection", "<", "String", ">", "getSlaveDataSourceNames", "(", ")", "{", "if", "(", "disabledDataSourceNames", ".", "isEmpty", "(", ")", ")", "{", "return", "super", ".", "getSlaveDataSourceNames", "(", ")", ";", "}", "Collection"...
Get slave data source names. @return available slave data source names
[ "Get", "slave", "data", "source", "names", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/rule/OrchestrationMasterSlaveRule.java#L45-L53
125,041
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/rule/OrchestrationMasterSlaveRule.java
OrchestrationMasterSlaveRule.updateDisabledDataSourceNames
public void updateDisabledDataSourceNames(final String dataSourceName, final boolean isDisabled) { if (isDisabled) { disabledDataSourceNames.add(dataSourceName); } else { disabledDataSourceNames.remove(dataSourceName); } }
java
public void updateDisabledDataSourceNames(final String dataSourceName, final boolean isDisabled) { if (isDisabled) { disabledDataSourceNames.add(dataSourceName); } else { disabledDataSourceNames.remove(dataSourceName); } }
[ "public", "void", "updateDisabledDataSourceNames", "(", "final", "String", "dataSourceName", ",", "final", "boolean", "isDisabled", ")", "{", "if", "(", "isDisabled", ")", "{", "disabledDataSourceNames", ".", "add", "(", "dataSourceName", ")", ";", "}", "else", ...
Update disabled data source names. @param dataSourceName data source name @param isDisabled is disabled
[ "Update", "disabled", "data", "source", "names", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/rule/OrchestrationMasterSlaveRule.java#L61-L67
125,042
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.getAlias
public Optional<String> getAlias(final String name) { if (containStar) { return Optional.absent(); } String rawName = SQLUtil.getExactlyValue(name); for (SelectItem each : items) { if (SQLUtil.getExactlyExpression(rawName).equalsIgnoreCase(SQLUtil.getExactlyExpres...
java
public Optional<String> getAlias(final String name) { if (containStar) { return Optional.absent(); } String rawName = SQLUtil.getExactlyValue(name); for (SelectItem each : items) { if (SQLUtil.getExactlyExpression(rawName).equalsIgnoreCase(SQLUtil.getExactlyExpres...
[ "public", "Optional", "<", "String", ">", "getAlias", "(", "final", "String", "name", ")", "{", "if", "(", "containStar", ")", "{", "return", "Optional", ".", "absent", "(", ")", ";", "}", "String", "rawName", "=", "SQLUtil", ".", "getExactlyValue", "(",...
Get alias. @param name name or alias @return alias
[ "Get", "alias", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L86-L100
125,043
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.getAggregationSelectItems
public List<AggregationSelectItem> getAggregationSelectItems() { List<AggregationSelectItem> result = new LinkedList<>(); for (SelectItem each : items) { if (each instanceof AggregationSelectItem) { AggregationSelectItem aggregationSelectItem = (AggregationSelectItem) each; ...
java
public List<AggregationSelectItem> getAggregationSelectItems() { List<AggregationSelectItem> result = new LinkedList<>(); for (SelectItem each : items) { if (each instanceof AggregationSelectItem) { AggregationSelectItem aggregationSelectItem = (AggregationSelectItem) each; ...
[ "public", "List", "<", "AggregationSelectItem", ">", "getAggregationSelectItems", "(", ")", "{", "List", "<", "AggregationSelectItem", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "SelectItem", "each", ":", "items", ")", "{", "if...
Get aggregation select items. @return aggregation select items
[ "Get", "aggregation", "select", "items", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L107-L117
125,044
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.getDistinctSelectItem
public Optional<DistinctSelectItem> getDistinctSelectItem() { for (SelectItem each : items) { if (each instanceof DistinctSelectItem) { return Optional.of((DistinctSelectItem) each); } } return Optional.absent(); }
java
public Optional<DistinctSelectItem> getDistinctSelectItem() { for (SelectItem each : items) { if (each instanceof DistinctSelectItem) { return Optional.of((DistinctSelectItem) each); } } return Optional.absent(); }
[ "public", "Optional", "<", "DistinctSelectItem", ">", "getDistinctSelectItem", "(", ")", "{", "for", "(", "SelectItem", "each", ":", "items", ")", "{", "if", "(", "each", "instanceof", "DistinctSelectItem", ")", "{", "return", "Optional", ".", "of", "(", "("...
Get distinct select item optional. @return distinct select items
[ "Get", "distinct", "select", "item", "optional", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L124-L131
125,045
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.getAggregationDistinctSelectItems
public List<AggregationDistinctSelectItem> getAggregationDistinctSelectItems() { List<AggregationDistinctSelectItem> result = new LinkedList<>(); for (SelectItem each : items) { if (each instanceof AggregationDistinctSelectItem) { result.add((AggregationDistinctSelectItem) ea...
java
public List<AggregationDistinctSelectItem> getAggregationDistinctSelectItems() { List<AggregationDistinctSelectItem> result = new LinkedList<>(); for (SelectItem each : items) { if (each instanceof AggregationDistinctSelectItem) { result.add((AggregationDistinctSelectItem) ea...
[ "public", "List", "<", "AggregationDistinctSelectItem", ">", "getAggregationDistinctSelectItems", "(", ")", "{", "List", "<", "AggregationDistinctSelectItem", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "SelectItem", "each", ":", "ite...
Get aggregation distinct select items. @return aggregation distinct select items
[ "Get", "aggregation", "distinct", "select", "items", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L138-L146
125,046
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.hasUnqualifiedStarSelectItem
public boolean hasUnqualifiedStarSelectItem() { for (SelectItem each : items) { if (each instanceof StarSelectItem && !((StarSelectItem) each).getOwner().isPresent()) { return true; } } return false; }
java
public boolean hasUnqualifiedStarSelectItem() { for (SelectItem each : items) { if (each instanceof StarSelectItem && !((StarSelectItem) each).getOwner().isPresent()) { return true; } } return false; }
[ "public", "boolean", "hasUnqualifiedStarSelectItem", "(", ")", "{", "for", "(", "SelectItem", "each", ":", "items", ")", "{", "if", "(", "each", "instanceof", "StarSelectItem", "&&", "!", "(", "(", "StarSelectItem", ")", "each", ")", ".", "getOwner", "(", ...
Judge has unqualified star select item. @return star select item without owner
[ "Judge", "has", "unqualified", "star", "select", "item", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L153-L160
125,047
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.getQualifiedStarSelectItems
public Collection<StarSelectItem> getQualifiedStarSelectItems() { Collection<StarSelectItem> result = new LinkedList<>(); for (SelectItem each : items) { if (each instanceof StarSelectItem && ((StarSelectItem) each).getOwner().isPresent()) { result.add((StarSelectItem) each);...
java
public Collection<StarSelectItem> getQualifiedStarSelectItems() { Collection<StarSelectItem> result = new LinkedList<>(); for (SelectItem each : items) { if (each instanceof StarSelectItem && ((StarSelectItem) each).getOwner().isPresent()) { result.add((StarSelectItem) each);...
[ "public", "Collection", "<", "StarSelectItem", ">", "getQualifiedStarSelectItems", "(", ")", "{", "Collection", "<", "StarSelectItem", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "SelectItem", "each", ":", "items", ")", "{", "if...
Get qualified star select items. @return qualified star select items
[ "Get", "qualified", "star", "select", "items", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L167-L175
125,048
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.findStarSelectItem
public Optional<StarSelectItem> findStarSelectItem(final String tableNameOrAlias) { Optional<Table> table = getTables().find(tableNameOrAlias); if (!table.isPresent()) { return Optional.absent(); } for (SelectItem each : items) { if (!(each instanceof StarSelectIt...
java
public Optional<StarSelectItem> findStarSelectItem(final String tableNameOrAlias) { Optional<Table> table = getTables().find(tableNameOrAlias); if (!table.isPresent()) { return Optional.absent(); } for (SelectItem each : items) { if (!(each instanceof StarSelectIt...
[ "public", "Optional", "<", "StarSelectItem", ">", "findStarSelectItem", "(", "final", "String", "tableNameOrAlias", ")", "{", "Optional", "<", "Table", ">", "table", "=", "getTables", "(", ")", ".", "find", "(", "tableNameOrAlias", ")", ";", "if", "(", "!", ...
Find star select item via table name or alias. @param tableNameOrAlias table name or alias @return star select item via table name or alias
[ "Find", "star", "select", "item", "via", "table", "name", "or", "alias", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L183-L198
125,049
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.setIndexForItems
public void setIndexForItems(final Map<String, Integer> columnLabelIndexMap) { setIndexForAggregationItem(columnLabelIndexMap); setIndexForOrderItem(columnLabelIndexMap, orderByItems); setIndexForOrderItem(columnLabelIndexMap, groupByItems); }
java
public void setIndexForItems(final Map<String, Integer> columnLabelIndexMap) { setIndexForAggregationItem(columnLabelIndexMap); setIndexForOrderItem(columnLabelIndexMap, orderByItems); setIndexForOrderItem(columnLabelIndexMap, groupByItems); }
[ "public", "void", "setIndexForItems", "(", "final", "Map", "<", "String", ",", "Integer", ">", "columnLabelIndexMap", ")", "{", "setIndexForAggregationItem", "(", "columnLabelIndexMap", ")", ";", "setIndexForOrderItem", "(", "columnLabelIndexMap", ",", "orderByItems", ...
Set index for select items. @param columnLabelIndexMap map for column label and index
[ "Set", "index", "for", "select", "items", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L214-L218
125,050
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java
SelectStatement.mergeSubqueryStatement
public SelectStatement mergeSubqueryStatement() { SelectStatement result = processLimitForSubquery(); processItems(result); processOrderByItems(result); result.setParametersIndex(getParametersIndex()); return result; }
java
public SelectStatement mergeSubqueryStatement() { SelectStatement result = processLimitForSubquery(); processItems(result); processOrderByItems(result); result.setParametersIndex(getParametersIndex()); return result; }
[ "public", "SelectStatement", "mergeSubqueryStatement", "(", ")", "{", "SelectStatement", "result", "=", "processLimitForSubquery", "(", ")", ";", "processItems", "(", "result", ")", ";", "processOrderByItems", "(", "result", ")", ";", "result", ".", "setParametersIn...
Merge subquery statement if contains. @return Select select statement
[ "Merge", "subquery", "statement", "if", "contains", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/sql/statement/dml/SelectStatement.java#L267-L273
125,051
apache/incubator-shardingsphere
sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/SQLLogger.java
SQLLogger.logSQL
public static void logSQL(final String logicSQL, final Collection<String> dataSourceNames) { log("Rule Type: master-slave"); log("SQL: {} ::: DataSources: {}", logicSQL, Joiner.on(",").join(dataSourceNames)); }
java
public static void logSQL(final String logicSQL, final Collection<String> dataSourceNames) { log("Rule Type: master-slave"); log("SQL: {} ::: DataSources: {}", logicSQL, Joiner.on(",").join(dataSourceNames)); }
[ "public", "static", "void", "logSQL", "(", "final", "String", "logicSQL", ",", "final", "Collection", "<", "String", ">", "dataSourceNames", ")", "{", "log", "(", "\"Rule Type: master-slave\"", ")", ";", "log", "(", "\"SQL: {} ::: DataSources: {}\"", ",", "logicSQ...
Print SQL log for master slave rule. @param logicSQL logic SQL @param dataSourceNames data source names
[ "Print", "SQL", "log", "for", "master", "slave", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/SQLLogger.java#L46-L49
125,052
apache/incubator-shardingsphere
sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/SQLLogger.java
SQLLogger.logSQL
public static void logSQL(final String logicSQL, final boolean showSimple, final SQLStatement sqlStatement, final Collection<RouteUnit> routeUnits) { log("Rule Type: sharding"); log("Logic SQL: {}", logicSQL); log("SQLStatement: {}", sqlStatement); if (showSimple) { logSimple...
java
public static void logSQL(final String logicSQL, final boolean showSimple, final SQLStatement sqlStatement, final Collection<RouteUnit> routeUnits) { log("Rule Type: sharding"); log("Logic SQL: {}", logicSQL); log("SQLStatement: {}", sqlStatement); if (showSimple) { logSimple...
[ "public", "static", "void", "logSQL", "(", "final", "String", "logicSQL", ",", "final", "boolean", "showSimple", ",", "final", "SQLStatement", "sqlStatement", ",", "final", "Collection", "<", "RouteUnit", ">", "routeUnits", ")", "{", "log", "(", "\"Rule Type: sh...
Print SQL log for sharding rule. @param logicSQL logic SQL @param showSimple whether show SQL in simple style @param sqlStatement SQL statement @param routeUnits route units
[ "Print", "SQL", "log", "for", "sharding", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/SQLLogger.java#L59-L68
125,053
apache/incubator-shardingsphere
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/yaml/YamlEncryptDataSourceFactory.java
YamlEncryptDataSourceFactory.createDataSource
@SneakyThrows public static DataSource createDataSource(final File yamlFile) { YamlRootEncryptRuleConfiguration config = YamlEngine.unmarshal(yamlFile, YamlRootEncryptRuleConfiguration.class); return EncryptDataSourceFactory.createDataSource(config.getDataSource(), new EncryptRuleConfigurationYamlSw...
java
@SneakyThrows public static DataSource createDataSource(final File yamlFile) { YamlRootEncryptRuleConfiguration config = YamlEngine.unmarshal(yamlFile, YamlRootEncryptRuleConfiguration.class); return EncryptDataSourceFactory.createDataSource(config.getDataSource(), new EncryptRuleConfigurationYamlSw...
[ "@", "SneakyThrows", "public", "static", "DataSource", "createDataSource", "(", "final", "File", "yamlFile", ")", "{", "YamlRootEncryptRuleConfiguration", "config", "=", "YamlEngine", ".", "unmarshal", "(", "yamlFile", ",", "YamlRootEncryptRuleConfiguration", ".", "clas...
Create encrypt data source. @param yamlFile YAML file for encrypt rule configuration with data sources @return encrypt data source
[ "Create", "encrypt", "data", "source", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/api/yaml/YamlEncryptDataSourceFactory.java#L45-L49
125,054
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/parser/advanced/AdvancedMatchHandler.java
AdvancedMatchHandler.getMatchedToken
public Token getMatchedToken(final int tokenType) throws RecognitionException { Token result = parser.getCurrentToken(); boolean isIdentifierCompatible = false; if (identifierTokenIndex == tokenType && identifierTokenIndex > result.getType()) { isIdentifierCompatible = true; ...
java
public Token getMatchedToken(final int tokenType) throws RecognitionException { Token result = parser.getCurrentToken(); boolean isIdentifierCompatible = false; if (identifierTokenIndex == tokenType && identifierTokenIndex > result.getType()) { isIdentifierCompatible = true; ...
[ "public", "Token", "getMatchedToken", "(", "final", "int", "tokenType", ")", "throws", "RecognitionException", "{", "Token", "result", "=", "parser", ".", "getCurrentToken", "(", ")", ";", "boolean", "isIdentifierCompatible", "=", "false", ";", "if", "(", "ident...
Get matched token by token type. @param tokenType token type @return matched token @throws RecognitionException mismatch throw exception
[ "Get", "matched", "token", "by", "token", "type", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/antlr/parser/advanced/AdvancedMatchHandler.java#L45-L64
125,055
apache/incubator-shardingsphere
sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-boot-starter/src/main/java/org/apache/shardingsphere/shardingjdbc/spring/boot/util/PropertyUtil.java
PropertyUtil.handle
@SuppressWarnings("unchecked") public static <T> T handle(final Environment environment, final String prefix, final Class<T> targetClass) { switch (springBootVersion) { case 1: return (T) v1(environment, prefix); default: return (T) v2(environment, pre...
java
@SuppressWarnings("unchecked") public static <T> T handle(final Environment environment, final String prefix, final Class<T> targetClass) { switch (springBootVersion) { case 1: return (T) v1(environment, prefix); default: return (T) v2(environment, pre...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "handle", "(", "final", "Environment", "environment", ",", "final", "String", "prefix", ",", "final", "Class", "<", "T", ">", "targetClass", ")", "{", "switch", "("...
Spring Boot 1.x is compatible with Spring Boot 2.x by Using Java Reflect. @param environment : the environment context @param prefix : the prefix part of property key @param targetClass : the target class type of result @param <T> : refer to @param targetClass @return T
[ "Spring", "Boot", "1", ".", "x", "is", "compatible", "with", "Spring", "Boot", "2", ".", "x", "by", "Using", "Java", "Reflect", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-spring/sharding-jdbc-spring/sharding-jdbc-spring-boot-starter/src/main/java/org/apache/shardingsphere/shardingjdbc/spring/boot/util/PropertyUtil.java#L55-L63
125,056
apache/incubator-shardingsphere
sharding-core/sharding-core-optimize/src/main/java/org/apache/shardingsphere/core/optimize/result/insert/InsertOptimizeResult.java
InsertOptimizeResult.addUnit
public void addUnit(final SQLExpression[] columnValues, final Object[] columnParameters) { if (type == InsertType.VALUES) { this.units.add(new ColumnValueOptimizeResult(columnNames, columnValues, columnParameters)); } else { this.units.add(new SetAssignmentOptimizeResult(columnNa...
java
public void addUnit(final SQLExpression[] columnValues, final Object[] columnParameters) { if (type == InsertType.VALUES) { this.units.add(new ColumnValueOptimizeResult(columnNames, columnValues, columnParameters)); } else { this.units.add(new SetAssignmentOptimizeResult(columnNa...
[ "public", "void", "addUnit", "(", "final", "SQLExpression", "[", "]", "columnValues", ",", "final", "Object", "[", "]", "columnParameters", ")", "{", "if", "(", "type", "==", "InsertType", ".", "VALUES", ")", "{", "this", ".", "units", ".", "add", "(", ...
Add insert optimize result uint. @param columnValues column values @param columnParameters column parameters
[ "Add", "insert", "optimize", "result", "uint", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-optimize/src/main/java/org/apache/shardingsphere/core/optimize/result/insert/InsertOptimizeResult.java#L53-L59
125,057
apache/incubator-shardingsphere
sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/MergeEngineFactory.java
MergeEngineFactory.newInstance
public static MergeEngine newInstance(final DatabaseType databaseType, final ShardingRule shardingRule, final SQLRouteResult routeResult, final ShardingTableMetaData shardingTableMetaData, final List<QueryResult> queryResults) throws SQLException { if (routeResult.getSq...
java
public static MergeEngine newInstance(final DatabaseType databaseType, final ShardingRule shardingRule, final SQLRouteResult routeResult, final ShardingTableMetaData shardingTableMetaData, final List<QueryResult> queryResults) throws SQLException { if (routeResult.getSq...
[ "public", "static", "MergeEngine", "newInstance", "(", "final", "DatabaseType", "databaseType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "SQLRouteResult", "routeResult", ",", "final", "ShardingTableMetaData", "shardingTableMetaData", ",", "final", "List...
Create merge engine instance. @param databaseType database type @param shardingRule sharding rule @param routeResult SQL route result @param shardingTableMetaData sharding table meta Data @param queryResults query results @return merge engine instance @throws SQLException SQL exception
[ "Create", "merge", "engine", "instance", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-merge/src/main/java/org/apache/shardingsphere/core/merge/MergeEngineFactory.java#L55-L64
125,058
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.findTableRule
public Optional<TableRule> findTableRule(final String logicTableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equalsIgnoreCase(logicTableName)) { return Optional.of(each); } } return Optional.absent(); }
java
public Optional<TableRule> findTableRule(final String logicTableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equalsIgnoreCase(logicTableName)) { return Optional.of(each); } } return Optional.absent(); }
[ "public", "Optional", "<", "TableRule", ">", "findTableRule", "(", "final", "String", "logicTableName", ")", "{", "for", "(", "TableRule", "each", ":", "tableRules", ")", "{", "if", "(", "each", ".", "getLogicTable", "(", ")", ".", "equalsIgnoreCase", "(", ...
Find table rule. @param logicTableName logic table name @return table rule
[ "Find", "table", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L152-L159
125,059
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.findTableRuleByActualTable
public Optional<TableRule> findTableRuleByActualTable(final String actualTableName) { for (TableRule each : tableRules) { if (each.isExisted(actualTableName)) { return Optional.of(each); } } return Optional.absent(); }
java
public Optional<TableRule> findTableRuleByActualTable(final String actualTableName) { for (TableRule each : tableRules) { if (each.isExisted(actualTableName)) { return Optional.of(each); } } return Optional.absent(); }
[ "public", "Optional", "<", "TableRule", ">", "findTableRuleByActualTable", "(", "final", "String", "actualTableName", ")", "{", "for", "(", "TableRule", "each", ":", "tableRules", ")", "{", "if", "(", "each", ".", "isExisted", "(", "actualTableName", ")", ")",...
Find table rule via actual table name. @param actualTableName actual table name @return table rule
[ "Find", "table", "rule", "via", "actual", "table", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L167-L174
125,060
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getTableRule
public TableRule getTableRule(final String logicTableName) { Optional<TableRule> tableRule = findTableRule(logicTableName); if (tableRule.isPresent()) { return tableRule.get(); } if (isBroadcastTable(logicTableName)) { return new TableRule(shardingDataSourceNames....
java
public TableRule getTableRule(final String logicTableName) { Optional<TableRule> tableRule = findTableRule(logicTableName); if (tableRule.isPresent()) { return tableRule.get(); } if (isBroadcastTable(logicTableName)) { return new TableRule(shardingDataSourceNames....
[ "public", "TableRule", "getTableRule", "(", "final", "String", "logicTableName", ")", "{", "Optional", "<", "TableRule", ">", "tableRule", "=", "findTableRule", "(", "logicTableName", ")", ";", "if", "(", "tableRule", ".", "isPresent", "(", ")", ")", "{", "r...
Get table rule. @param logicTableName logic table name @return table rule
[ "Get", "table", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L182-L194
125,061
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getDatabaseShardingStrategy
public ShardingStrategy getDatabaseShardingStrategy(final TableRule tableRule) { return null == tableRule.getDatabaseShardingStrategy() ? defaultDatabaseShardingStrategy : tableRule.getDatabaseShardingStrategy(); }
java
public ShardingStrategy getDatabaseShardingStrategy(final TableRule tableRule) { return null == tableRule.getDatabaseShardingStrategy() ? defaultDatabaseShardingStrategy : tableRule.getDatabaseShardingStrategy(); }
[ "public", "ShardingStrategy", "getDatabaseShardingStrategy", "(", "final", "TableRule", "tableRule", ")", "{", "return", "null", "==", "tableRule", ".", "getDatabaseShardingStrategy", "(", ")", "?", "defaultDatabaseShardingStrategy", ":", "tableRule", ".", "getDatabaseSha...
Get database sharding strategy. <p> Use default database sharding strategy if not found. </p> @param tableRule table rule @return database sharding strategy
[ "Get", "database", "sharding", "strategy", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L206-L208
125,062
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getTableShardingStrategy
public ShardingStrategy getTableShardingStrategy(final TableRule tableRule) { return null == tableRule.getTableShardingStrategy() ? defaultTableShardingStrategy : tableRule.getTableShardingStrategy(); }
java
public ShardingStrategy getTableShardingStrategy(final TableRule tableRule) { return null == tableRule.getTableShardingStrategy() ? defaultTableShardingStrategy : tableRule.getTableShardingStrategy(); }
[ "public", "ShardingStrategy", "getTableShardingStrategy", "(", "final", "TableRule", "tableRule", ")", "{", "return", "null", "==", "tableRule", ".", "getTableShardingStrategy", "(", ")", "?", "defaultTableShardingStrategy", ":", "tableRule", ".", "getTableShardingStrateg...
Get table sharding strategy. <p> Use default table sharding strategy if not found. </p> @param tableRule table rule @return table sharding strategy
[ "Get", "table", "sharding", "strategy", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L220-L222
125,063
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.isAllBindingTables
public boolean isAllBindingTables(final Collection<String> logicTableNames) { if (logicTableNames.isEmpty()) { return false; } Optional<BindingTableRule> bindingTableRule = findBindingTableRule(logicTableNames); if (!bindingTableRule.isPresent()) { return false; ...
java
public boolean isAllBindingTables(final Collection<String> logicTableNames) { if (logicTableNames.isEmpty()) { return false; } Optional<BindingTableRule> bindingTableRule = findBindingTableRule(logicTableNames); if (!bindingTableRule.isPresent()) { return false; ...
[ "public", "boolean", "isAllBindingTables", "(", "final", "Collection", "<", "String", ">", "logicTableNames", ")", "{", "if", "(", "logicTableNames", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "Optional", "<", "BindingTableRule", ">", "...
Judge logic tables is all belong to binding encryptors. @param logicTableNames logic table names @return logic tables is all belong to binding encryptors or not
[ "Judge", "logic", "tables", "is", "all", "belong", "to", "binding", "encryptors", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L230-L241
125,064
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.findBindingTableRule
public Optional<BindingTableRule> findBindingTableRule(final String logicTableName) { for (BindingTableRule each : bindingTableRules) { if (each.hasLogicTable(logicTableName)) { return Optional.of(each); } } return Optional.absent(); }
java
public Optional<BindingTableRule> findBindingTableRule(final String logicTableName) { for (BindingTableRule each : bindingTableRules) { if (each.hasLogicTable(logicTableName)) { return Optional.of(each); } } return Optional.absent(); }
[ "public", "Optional", "<", "BindingTableRule", ">", "findBindingTableRule", "(", "final", "String", "logicTableName", ")", "{", "for", "(", "BindingTableRule", "each", ":", "bindingTableRules", ")", "{", "if", "(", "each", ".", "hasLogicTable", "(", "logicTableNam...
Find binding table rule via logic table name. @param logicTableName logic table name @return binding table rule
[ "Find", "binding", "table", "rule", "via", "logic", "table", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L259-L266
125,065
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.isAllBroadcastTables
public boolean isAllBroadcastTables(final Collection<String> logicTableNames) { if (logicTableNames.isEmpty()) { return false; } for (String each : logicTableNames) { if (!isBroadcastTable(each)) { return false; } } return true;...
java
public boolean isAllBroadcastTables(final Collection<String> logicTableNames) { if (logicTableNames.isEmpty()) { return false; } for (String each : logicTableNames) { if (!isBroadcastTable(each)) { return false; } } return true;...
[ "public", "boolean", "isAllBroadcastTables", "(", "final", "Collection", "<", "String", ">", "logicTableNames", ")", "{", "if", "(", "logicTableNames", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "for", "(", "String", "each", ":", "log...
Judge logic tables is all belong to broadcast encryptors. @param logicTableNames logic table names @return logic tables is all belong to broadcast encryptors or not
[ "Judge", "logic", "tables", "is", "all", "belong", "to", "broadcast", "encryptors", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L274-L284
125,066
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.isBroadcastTable
public boolean isBroadcastTable(final String logicTableName) { for (String each : broadcastTables) { if (each.equalsIgnoreCase(logicTableName)) { return true; } } return false; }
java
public boolean isBroadcastTable(final String logicTableName) { for (String each : broadcastTables) { if (each.equalsIgnoreCase(logicTableName)) { return true; } } return false; }
[ "public", "boolean", "isBroadcastTable", "(", "final", "String", "logicTableName", ")", "{", "for", "(", "String", "each", ":", "broadcastTables", ")", "{", "if", "(", "each", ".", "equalsIgnoreCase", "(", "logicTableName", ")", ")", "{", "return", "true", "...
Judge logic table is belong to broadcast tables. @param logicTableName logic table name @return logic table is belong to broadcast tables or not
[ "Judge", "logic", "table", "is", "belong", "to", "broadcast", "tables", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L292-L299
125,067
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.isAllInDefaultDataSource
public boolean isAllInDefaultDataSource(final Collection<String> logicTableNames) { for (String each : logicTableNames) { if (findTableRule(each).isPresent() || isBroadcastTable(each)) { return false; } } return !logicTableNames.isEmpty(); }
java
public boolean isAllInDefaultDataSource(final Collection<String> logicTableNames) { for (String each : logicTableNames) { if (findTableRule(each).isPresent() || isBroadcastTable(each)) { return false; } } return !logicTableNames.isEmpty(); }
[ "public", "boolean", "isAllInDefaultDataSource", "(", "final", "Collection", "<", "String", ">", "logicTableNames", ")", "{", "for", "(", "String", "each", ":", "logicTableNames", ")", "{", "if", "(", "findTableRule", "(", "each", ")", ".", "isPresent", "(", ...
Judge logic tables is all belong to default data source. @param logicTableNames logic table names @return logic tables is all belong to default data source
[ "Judge", "logic", "tables", "is", "all", "belong", "to", "default", "data", "source", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L307-L314
125,068
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.isShardingColumn
public boolean isShardingColumn(final String columnName, final String tableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equalsIgnoreCase(tableName) && isShardingColumn(each, columnName)) { return true; } } return false; }
java
public boolean isShardingColumn(final String columnName, final String tableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equalsIgnoreCase(tableName) && isShardingColumn(each, columnName)) { return true; } } return false; }
[ "public", "boolean", "isShardingColumn", "(", "final", "String", "columnName", ",", "final", "String", "tableName", ")", "{", "for", "(", "TableRule", "each", ":", "tableRules", ")", "{", "if", "(", "each", ".", "getLogicTable", "(", ")", ".", "equalsIgnoreC...
Judge is sharding column or not. @param columnName column name @param tableName table name @return is sharding column or not
[ "Judge", "is", "sharding", "column", "or", "not", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L323-L330
125,069
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.findGenerateKeyColumnName
public Optional<String> findGenerateKeyColumnName(final String logicTableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equalsIgnoreCase(logicTableName) && null != each.getGenerateKeyColumn()) { return Optional.of(each.getGenerateKeyColumn()); } ...
java
public Optional<String> findGenerateKeyColumnName(final String logicTableName) { for (TableRule each : tableRules) { if (each.getLogicTable().equalsIgnoreCase(logicTableName) && null != each.getGenerateKeyColumn()) { return Optional.of(each.getGenerateKeyColumn()); } ...
[ "public", "Optional", "<", "String", ">", "findGenerateKeyColumnName", "(", "final", "String", "logicTableName", ")", "{", "for", "(", "TableRule", "each", ":", "tableRules", ")", "{", "if", "(", "each", ".", "getLogicTable", "(", ")", ".", "equalsIgnoreCase",...
Find column name of generated key. @param logicTableName logic table name @return column name of generated key
[ "Find", "column", "name", "of", "generated", "key", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L342-L349
125,070
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getLogicTableName
public String getLogicTableName(final String logicIndexName) { for (TableRule each : tableRules) { if (logicIndexName.equals(each.getLogicIndex())) { return each.getLogicTable(); } } throw new ShardingConfigurationException("Cannot find logic table name wi...
java
public String getLogicTableName(final String logicIndexName) { for (TableRule each : tableRules) { if (logicIndexName.equals(each.getLogicIndex())) { return each.getLogicTable(); } } throw new ShardingConfigurationException("Cannot find logic table name wi...
[ "public", "String", "getLogicTableName", "(", "final", "String", "logicIndexName", ")", "{", "for", "(", "TableRule", "each", ":", "tableRules", ")", "{", "if", "(", "logicIndexName", ".", "equals", "(", "each", ".", "getLogicIndex", "(", ")", ")", ")", "{...
Get logic table name base on logic index name. @param logicIndexName logic index name @return logic table name
[ "Get", "logic", "table", "name", "base", "on", "logic", "index", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L372-L379
125,071
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getLogicTableNames
public Collection<String> getLogicTableNames(final String actualTableName) { Collection<String> result = new LinkedList<>(); for (TableRule each : tableRules) { if (each.isExisted(actualTableName)) { result.add(each.getLogicTable()); } } return res...
java
public Collection<String> getLogicTableNames(final String actualTableName) { Collection<String> result = new LinkedList<>(); for (TableRule each : tableRules) { if (each.isExisted(actualTableName)) { result.add(each.getLogicTable()); } } return res...
[ "public", "Collection", "<", "String", ">", "getLogicTableNames", "(", "final", "String", "actualTableName", ")", "{", "Collection", "<", "String", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "TableRule", "each", ":", "tableRule...
Get logic table names base on actual table name. @param actualTableName actual table name @return logic table name
[ "Get", "logic", "table", "names", "base", "on", "actual", "table", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L387-L395
125,072
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getDataNode
public DataNode getDataNode(final String logicTableName) { TableRule tableRule = getTableRule(logicTableName); return tableRule.getActualDataNodes().get(0); }
java
public DataNode getDataNode(final String logicTableName) { TableRule tableRule = getTableRule(logicTableName); return tableRule.getActualDataNodes().get(0); }
[ "public", "DataNode", "getDataNode", "(", "final", "String", "logicTableName", ")", "{", "TableRule", "tableRule", "=", "getTableRule", "(", "logicTableName", ")", ";", "return", "tableRule", ".", "getActualDataNodes", "(", ")", ".", "get", "(", "0", ")", ";",...
Find data node by logic table name. @param logicTableName logic table name @return data node
[ "Find", "data", "node", "by", "logic", "table", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L403-L406
125,073
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getDataNode
public DataNode getDataNode(final String dataSourceName, final String logicTableName) { TableRule tableRule = getTableRule(logicTableName); for (DataNode each : tableRule.getActualDataNodes()) { if (shardingDataSourceNames.getDataSourceNames().contains(each.getDataSourceName()) && each.getDa...
java
public DataNode getDataNode(final String dataSourceName, final String logicTableName) { TableRule tableRule = getTableRule(logicTableName); for (DataNode each : tableRule.getActualDataNodes()) { if (shardingDataSourceNames.getDataSourceNames().contains(each.getDataSourceName()) && each.getDa...
[ "public", "DataNode", "getDataNode", "(", "final", "String", "dataSourceName", ",", "final", "String", "logicTableName", ")", "{", "TableRule", "tableRule", "=", "getTableRule", "(", "logicTableName", ")", ";", "for", "(", "DataNode", "each", ":", "tableRule", "...
Find data node by data source and logic table. @param dataSourceName data source name @param logicTableName logic table name @return data node
[ "Find", "data", "node", "by", "data", "source", "and", "logic", "table", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L415-L423
125,074
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.findActualDefaultDataSourceName
public Optional<String> findActualDefaultDataSourceName() { String defaultDataSourceName = shardingDataSourceNames.getDefaultDataSourceName(); if (Strings.isNullOrEmpty(defaultDataSourceName)) { return Optional.absent(); } Optional<String> masterDefaultDataSourceName = findMa...
java
public Optional<String> findActualDefaultDataSourceName() { String defaultDataSourceName = shardingDataSourceNames.getDefaultDataSourceName(); if (Strings.isNullOrEmpty(defaultDataSourceName)) { return Optional.absent(); } Optional<String> masterDefaultDataSourceName = findMa...
[ "public", "Optional", "<", "String", ">", "findActualDefaultDataSourceName", "(", ")", "{", "String", "defaultDataSourceName", "=", "shardingDataSourceNames", ".", "getDefaultDataSourceName", "(", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "defaultData...
Find actual default data source name. <p>If use master-slave rule, return master data source name.</p> @return actual default data source name
[ "Find", "actual", "default", "data", "source", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L432-L439
125,075
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.findMasterSlaveRule
public Optional<MasterSlaveRule> findMasterSlaveRule(final String dataSourceName) { for (MasterSlaveRule each : masterSlaveRules) { if (each.containDataSourceName(dataSourceName)) { return Optional.of(each); } } return Optional.absent(); }
java
public Optional<MasterSlaveRule> findMasterSlaveRule(final String dataSourceName) { for (MasterSlaveRule each : masterSlaveRules) { if (each.containDataSourceName(dataSourceName)) { return Optional.of(each); } } return Optional.absent(); }
[ "public", "Optional", "<", "MasterSlaveRule", ">", "findMasterSlaveRule", "(", "final", "String", "dataSourceName", ")", "{", "for", "(", "MasterSlaveRule", "each", ":", "masterSlaveRules", ")", "{", "if", "(", "each", ".", "containDataSourceName", "(", "dataSourc...
Find master slave rule. @param dataSourceName data source name @return master slave rule
[ "Find", "master", "slave", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L456-L463
125,076
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getActualDataSourceName
public String getActualDataSourceName(final String actualTableName) { Optional<TableRule> tableRule = findTableRuleByActualTable(actualTableName); if (tableRule.isPresent()) { return tableRule.get().getActualDatasourceNames().iterator().next(); } if (!Strings.isNullOrEmpty(sh...
java
public String getActualDataSourceName(final String actualTableName) { Optional<TableRule> tableRule = findTableRuleByActualTable(actualTableName); if (tableRule.isPresent()) { return tableRule.get().getActualDatasourceNames().iterator().next(); } if (!Strings.isNullOrEmpty(sh...
[ "public", "String", "getActualDataSourceName", "(", "final", "String", "actualTableName", ")", "{", "Optional", "<", "TableRule", ">", "tableRule", "=", "findTableRuleByActualTable", "(", "actualTableName", ")", ";", "if", "(", "tableRule", ".", "isPresent", "(", ...
Get actual data source name. @param actualTableName actual table name @return actual data source name
[ "Get", "actual", "data", "source", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L471-L480
125,077
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.contains
public boolean contains(final String logicTableName) { return findTableRule(logicTableName).isPresent() || findBindingTableRule(logicTableName).isPresent() || isBroadcastTable(logicTableName); }
java
public boolean contains(final String logicTableName) { return findTableRule(logicTableName).isPresent() || findBindingTableRule(logicTableName).isPresent() || isBroadcastTable(logicTableName); }
[ "public", "boolean", "contains", "(", "final", "String", "logicTableName", ")", "{", "return", "findTableRule", "(", "logicTableName", ")", ".", "isPresent", "(", ")", "||", "findBindingTableRule", "(", "logicTableName", ")", ".", "isPresent", "(", ")", "||", ...
Judge contains table in sharding rule. @param logicTableName logic table name @return contains table in sharding rule or not
[ "Judge", "contains", "table", "in", "sharding", "rule", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L488-L490
125,078
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java
ShardingRule.getShardingLogicTableNames
public Collection<String> getShardingLogicTableNames(final Collection<String> logicTableNames) { Collection<String> result = new LinkedList<>(); for (String each : logicTableNames) { Optional<TableRule> tableRule = findTableRule(each); if (tableRule.isPresent()) { ...
java
public Collection<String> getShardingLogicTableNames(final Collection<String> logicTableNames) { Collection<String> result = new LinkedList<>(); for (String each : logicTableNames) { Optional<TableRule> tableRule = findTableRule(each); if (tableRule.isPresent()) { ...
[ "public", "Collection", "<", "String", ">", "getShardingLogicTableNames", "(", "final", "Collection", "<", "String", ">", "logicTableNames", ")", "{", "Collection", "<", "String", ">", "result", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "Str...
Get sharding logic table names. @param logicTableNames logic table names @return sharding logic table names
[ "Get", "sharding", "logic", "table", "names", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingRule.java#L498-L507
125,079
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/connection/ResourceSynchronizer.java
ResourceSynchronizer.doAwaitUntil
void doAwaitUntil() throws InterruptedException { lock.lock(); try { condition.await(DEFAULT_TIMEOUT_MILLISECONDS, TimeUnit.MILLISECONDS); } finally { lock.unlock(); } }
java
void doAwaitUntil() throws InterruptedException { lock.lock(); try { condition.await(DEFAULT_TIMEOUT_MILLISECONDS, TimeUnit.MILLISECONDS); } finally { lock.unlock(); } }
[ "void", "doAwaitUntil", "(", ")", "throws", "InterruptedException", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "condition", ".", "await", "(", "DEFAULT_TIMEOUT_MILLISECONDS", ",", "TimeUnit", ".", "MILLISECONDS", ")", ";", "}", "finally", "{", "loc...
Do await until default timeout milliseconds. @throws InterruptedException interrupted exception
[ "Do", "await", "until", "default", "timeout", "milliseconds", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/connection/ResourceSynchronizer.java#L57-L64
125,080
apache/incubator-shardingsphere
sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/router/sharding/RoutingEngineFactory.java
RoutingEngineFactory.newInstance
public static RoutingEngine newInstance(final ShardingRule shardingRule, final ShardingDataSourceMetaData shardingDataSourceMetaData, final SQLStatement sqlStatement, final OptimizeResult optimizeResult) { Collection<String> tableNames = sqlStatement.getTables().getTa...
java
public static RoutingEngine newInstance(final ShardingRule shardingRule, final ShardingDataSourceMetaData shardingDataSourceMetaData, final SQLStatement sqlStatement, final OptimizeResult optimizeResult) { Collection<String> tableNames = sqlStatement.getTables().getTa...
[ "public", "static", "RoutingEngine", "newInstance", "(", "final", "ShardingRule", "shardingRule", ",", "final", "ShardingDataSourceMetaData", "shardingDataSourceMetaData", ",", "final", "SQLStatement", "sqlStatement", ",", "final", "OptimizeResult", "optimizeResult", ")", "...
Create new instance of routing engine. @param shardingRule sharding rule @param shardingDataSourceMetaData sharding data source meta data @param sqlStatement sql statement @param optimizeResult optimize result @return new instance of routing engine
[ "Create", "new", "instance", "of", "routing", "engine", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/router/sharding/RoutingEngineFactory.java#L61-L91
125,081
apache/incubator-shardingsphere
sharding-transaction/sharding-transaction-2pc/sharding-transaction-xa/sharding-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/swapper/DataSourceSwapper.java
DataSourceSwapper.swap
public DatabaseAccessConfiguration swap(final DataSource dataSource) { DataSourcePropertyProvider provider = DataSourcePropertyProviderLoader.getProvider(dataSource); try { String url = (String) findGetterMethod(dataSource, provider.getURLPropertyName()).invoke(dataSource); Strin...
java
public DatabaseAccessConfiguration swap(final DataSource dataSource) { DataSourcePropertyProvider provider = DataSourcePropertyProviderLoader.getProvider(dataSource); try { String url = (String) findGetterMethod(dataSource, provider.getURLPropertyName()).invoke(dataSource); Strin...
[ "public", "DatabaseAccessConfiguration", "swap", "(", "final", "DataSource", "dataSource", ")", "{", "DataSourcePropertyProvider", "provider", "=", "DataSourcePropertyProviderLoader", ".", "getProvider", "(", "dataSource", ")", ";", "try", "{", "String", "url", "=", "...
Swap data source to database access configuration. @param dataSource data source @return database access configuration
[ "Swap", "data", "source", "to", "database", "access", "configuration", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-transaction/sharding-transaction-2pc/sharding-transaction-xa/sharding-transaction-xa-core/src/main/java/org/apache/shardingsphere/transaction/xa/jta/datasource/swapper/DataSourceSwapper.java#L41-L52
125,082
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dal/describe/DescribeParserFactory.java
DescribeParserFactory.newInstance
public static AbstractDescribeParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLDescribeParser(shardingRule, lexerEngine); default: ...
java
public static AbstractDescribeParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLDescribeParser(shardingRule, lexerEngine); default: ...
[ "public", "static", "AbstractDescribeParser", "newInstance", "(", "final", "DatabaseType", "dbType", ",", "final", "ShardingRule", "shardingRule", ",", "final", "LexerEngine", "lexerEngine", ")", "{", "switch", "(", "dbType", ")", "{", "case", "H2", ":", "case", ...
Create describe parser instance. @param dbType database type @param shardingRule databases and tables sharding rule @param lexerEngine lexical analysis engine. @return describe parser instance
[ "Create", "describe", "parser", "instance", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/sql/dal/describe/DescribeParserFactory.java#L43-L51
125,083
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingDataSourceNames.java
ShardingDataSourceNames.getRawMasterDataSourceName
public String getRawMasterDataSourceName(final String dataSourceName) { for (MasterSlaveRuleConfiguration each : shardingRuleConfig.getMasterSlaveRuleConfigs()) { if (each.getName().equals(dataSourceName)) { return each.getMasterDataSourceName(); } } retur...
java
public String getRawMasterDataSourceName(final String dataSourceName) { for (MasterSlaveRuleConfiguration each : shardingRuleConfig.getMasterSlaveRuleConfigs()) { if (each.getName().equals(dataSourceName)) { return each.getMasterDataSourceName(); } } retur...
[ "public", "String", "getRawMasterDataSourceName", "(", "final", "String", "dataSourceName", ")", "{", "for", "(", "MasterSlaveRuleConfiguration", "each", ":", "shardingRuleConfig", ".", "getMasterSlaveRuleConfigs", "(", ")", ")", "{", "if", "(", "each", ".", "getNam...
Get raw master data source name. @param dataSourceName data source name @return raw master data source name
[ "Get", "raw", "master", "data", "source", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingDataSourceNames.java#L73-L80
125,084
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingDataSourceNames.java
ShardingDataSourceNames.getRandomDataSourceName
public String getRandomDataSourceName(final Collection<String> dataSourceNames) { Random random = new Random(); int index = random.nextInt(dataSourceNames.size()); Iterator<String> iterator = dataSourceNames.iterator(); for (int i = 0; i < index; i++) { iterator.next(); ...
java
public String getRandomDataSourceName(final Collection<String> dataSourceNames) { Random random = new Random(); int index = random.nextInt(dataSourceNames.size()); Iterator<String> iterator = dataSourceNames.iterator(); for (int i = 0; i < index; i++) { iterator.next(); ...
[ "public", "String", "getRandomDataSourceName", "(", "final", "Collection", "<", "String", ">", "dataSourceNames", ")", "{", "Random", "random", "=", "new", "Random", "(", ")", ";", "int", "index", "=", "random", ".", "nextInt", "(", "dataSourceNames", ".", "...
Get random data source name. @param dataSourceNames available data source names @return random data source name
[ "Get", "random", "data", "source", "name", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/ShardingDataSourceNames.java#L97-L105
125,085
apache/incubator-shardingsphere
sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/router/masterslave/ShardingMasterSlaveRouter.java
ShardingMasterSlaveRouter.route
public SQLRouteResult route(final SQLRouteResult sqlRouteResult) { for (MasterSlaveRule each : masterSlaveRules) { route(each, sqlRouteResult); } return sqlRouteResult; }
java
public SQLRouteResult route(final SQLRouteResult sqlRouteResult) { for (MasterSlaveRule each : masterSlaveRules) { route(each, sqlRouteResult); } return sqlRouteResult; }
[ "public", "SQLRouteResult", "route", "(", "final", "SQLRouteResult", "sqlRouteResult", ")", "{", "for", "(", "MasterSlaveRule", "each", ":", "masterSlaveRules", ")", "{", "route", "(", "each", ",", "sqlRouteResult", ")", ";", "}", "return", "sqlRouteResult", ";"...
Route Master slave after sharding. @param sqlRouteResult SQL route result @return route result
[ "Route", "Master", "slave", "after", "sharding", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-route/src/main/java/org/apache/shardingsphere/core/route/router/masterslave/ShardingMasterSlaveRouter.java#L47-L52
125,086
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java
ConfigurationService.persistConfiguration
public void persistConfiguration(final String shardingSchemaName, final Map<String, DataSourceConfiguration> dataSourceConfigs, final RuleConfiguration ruleConfig, final Authentication authentication, final Properties props, final boolean isOverwrite) { persistDataSourceConf...
java
public void persistConfiguration(final String shardingSchemaName, final Map<String, DataSourceConfiguration> dataSourceConfigs, final RuleConfiguration ruleConfig, final Authentication authentication, final Properties props, final boolean isOverwrite) { persistDataSourceConf...
[ "public", "void", "persistConfiguration", "(", "final", "String", "shardingSchemaName", ",", "final", "Map", "<", "String", ",", "DataSourceConfiguration", ">", "dataSourceConfigs", ",", "final", "RuleConfiguration", "ruleConfig", ",", "final", "Authentication", "authen...
Persist rule configuration. @param shardingSchemaName sharding schema name @param dataSourceConfigs data source configuration map @param ruleConfig rule configuration @param authentication authentication @param props sharding properties @param isOverwrite is overwrite registry center's configuration
[ "Persist", "rule", "configuration", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java#L73-L79
125,087
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java
ConfigurationService.hasDataSourceConfiguration
public boolean hasDataSourceConfiguration(final String shardingSchemaName) { return !Strings.isNullOrEmpty(regCenter.get(configNode.getDataSourcePath(shardingSchemaName))); }
java
public boolean hasDataSourceConfiguration(final String shardingSchemaName) { return !Strings.isNullOrEmpty(regCenter.get(configNode.getDataSourcePath(shardingSchemaName))); }
[ "public", "boolean", "hasDataSourceConfiguration", "(", "final", "String", "shardingSchemaName", ")", "{", "return", "!", "Strings", ".", "isNullOrEmpty", "(", "regCenter", ".", "get", "(", "configNode", ".", "getDataSourcePath", "(", "shardingSchemaName", ")", ")",...
Judge whether schema has data source configuration. @param shardingSchemaName shading schema name @return has data source configuration or not
[ "Judge", "whether", "schema", "has", "data", "source", "configuration", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java#L103-L105
125,088
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java
ConfigurationService.hasRuleConfiguration
public boolean hasRuleConfiguration(final String shardingSchemaName) { return !Strings.isNullOrEmpty(regCenter.get(configNode.getRulePath(shardingSchemaName))); }
java
public boolean hasRuleConfiguration(final String shardingSchemaName) { return !Strings.isNullOrEmpty(regCenter.get(configNode.getRulePath(shardingSchemaName))); }
[ "public", "boolean", "hasRuleConfiguration", "(", "final", "String", "shardingSchemaName", ")", "{", "return", "!", "Strings", ".", "isNullOrEmpty", "(", "regCenter", ".", "get", "(", "configNode", ".", "getRulePath", "(", "shardingSchemaName", ")", ")", ")", ";...
Judge whether schema has rule configuration. @param shardingSchemaName sharding schema name @return has rule configuration or not
[ "Judge", "whether", "schema", "has", "rule", "configuration", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java#L123-L125
125,089
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java
ConfigurationService.loadDataSourceConfigurations
@SuppressWarnings("unchecked") public Map<String, DataSourceConfiguration> loadDataSourceConfigurations(final String shardingSchemaName) { Map<String, YamlDataSourceConfiguration> result = (Map) YamlEngine.unmarshal(regCenter.getDirectly(configNode.getDataSourcePath(shardingSchemaName))); Preconditi...
java
@SuppressWarnings("unchecked") public Map<String, DataSourceConfiguration> loadDataSourceConfigurations(final String shardingSchemaName) { Map<String, YamlDataSourceConfiguration> result = (Map) YamlEngine.unmarshal(regCenter.getDirectly(configNode.getDataSourcePath(shardingSchemaName))); Preconditi...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Map", "<", "String", ",", "DataSourceConfiguration", ">", "loadDataSourceConfigurations", "(", "final", "String", "shardingSchemaName", ")", "{", "Map", "<", "String", ",", "YamlDataSourceConfiguration", "...
Load data source configurations. @param shardingSchemaName sharding schema name @return data source configurations
[ "Load", "data", "source", "configurations", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java#L175-L186
125,090
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java
ConfigurationService.loadShardingRuleConfiguration
public ShardingRuleConfiguration loadShardingRuleConfiguration(final String shardingSchemaName) { return new ShardingRuleConfigurationYamlSwapper().swap(YamlEngine.unmarshal(regCenter.getDirectly(configNode.getRulePath(shardingSchemaName)), YamlShardingRuleConfiguration.class)); }
java
public ShardingRuleConfiguration loadShardingRuleConfiguration(final String shardingSchemaName) { return new ShardingRuleConfigurationYamlSwapper().swap(YamlEngine.unmarshal(regCenter.getDirectly(configNode.getRulePath(shardingSchemaName)), YamlShardingRuleConfiguration.class)); }
[ "public", "ShardingRuleConfiguration", "loadShardingRuleConfiguration", "(", "final", "String", "shardingSchemaName", ")", "{", "return", "new", "ShardingRuleConfigurationYamlSwapper", "(", ")", ".", "swap", "(", "YamlEngine", ".", "unmarshal", "(", "regCenter", ".", "g...
Load sharding rule configuration. @param shardingSchemaName sharding schema name @return sharding rule configuration
[ "Load", "sharding", "rule", "configuration", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java#L194-L196
125,091
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java
ConfigurationService.loadMasterSlaveRuleConfiguration
public MasterSlaveRuleConfiguration loadMasterSlaveRuleConfiguration(final String shardingSchemaName) { return new MasterSlaveRuleConfigurationYamlSwapper().swap(YamlEngine.unmarshal(regCenter.getDirectly(configNode.getRulePath(shardingSchemaName)), YamlMasterSlaveRuleConfiguration.class)); }
java
public MasterSlaveRuleConfiguration loadMasterSlaveRuleConfiguration(final String shardingSchemaName) { return new MasterSlaveRuleConfigurationYamlSwapper().swap(YamlEngine.unmarshal(regCenter.getDirectly(configNode.getRulePath(shardingSchemaName)), YamlMasterSlaveRuleConfiguration.class)); }
[ "public", "MasterSlaveRuleConfiguration", "loadMasterSlaveRuleConfiguration", "(", "final", "String", "shardingSchemaName", ")", "{", "return", "new", "MasterSlaveRuleConfigurationYamlSwapper", "(", ")", ".", "swap", "(", "YamlEngine", ".", "unmarshal", "(", "regCenter", ...
Load master-slave rule configuration. @param shardingSchemaName sharding schema name @return master-slave rule configuration
[ "Load", "master", "-", "slave", "rule", "configuration", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java#L204-L206
125,092
apache/incubator-shardingsphere
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java
ConfigurationService.loadAuthentication
public Authentication loadAuthentication() { return new AuthenticationYamlSwapper().swap(YamlEngine.unmarshal(regCenter.getDirectly(configNode.getAuthenticationPath()), YamlAuthenticationConfiguration.class)); }
java
public Authentication loadAuthentication() { return new AuthenticationYamlSwapper().swap(YamlEngine.unmarshal(regCenter.getDirectly(configNode.getAuthenticationPath()), YamlAuthenticationConfiguration.class)); }
[ "public", "Authentication", "loadAuthentication", "(", ")", "{", "return", "new", "AuthenticationYamlSwapper", "(", ")", ".", "swap", "(", "YamlEngine", ".", "unmarshal", "(", "regCenter", ".", "getDirectly", "(", "configNode", ".", "getAuthenticationPath", "(", "...
Load authentication. @return authentication
[ "Load", "authentication", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/registry/config/service/ConfigurationService.java#L213-L215
125,093
apache/incubator-shardingsphere
sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java
HintManager.setDatabaseShardingValue
public void setDatabaseShardingValue(final Comparable<?> value) { databaseShardingValues.clear(); databaseShardingValues.put("", value); databaseShardingOnly = true; }
java
public void setDatabaseShardingValue(final Comparable<?> value) { databaseShardingValues.clear(); databaseShardingValues.put("", value); databaseShardingOnly = true; }
[ "public", "void", "setDatabaseShardingValue", "(", "final", "Comparable", "<", "?", ">", "value", ")", "{", "databaseShardingValues", ".", "clear", "(", ")", ";", "databaseShardingValues", ".", "put", "(", "\"\"", ",", "value", ")", ";", "databaseShardingOnly", ...
Set sharding value for database sharding only. <p>The sharding operator is {@code =}</p> @param value sharding value
[ "Set", "sharding", "value", "for", "database", "sharding", "only", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java#L68-L72
125,094
apache/incubator-shardingsphere
sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java
HintManager.addDatabaseShardingValue
public void addDatabaseShardingValue(final String logicTable, final Comparable<?> value) { databaseShardingValues.put(logicTable, value); databaseShardingOnly = false; }
java
public void addDatabaseShardingValue(final String logicTable, final Comparable<?> value) { databaseShardingValues.put(logicTable, value); databaseShardingOnly = false; }
[ "public", "void", "addDatabaseShardingValue", "(", "final", "String", "logicTable", ",", "final", "Comparable", "<", "?", ">", "value", ")", "{", "databaseShardingValues", ".", "put", "(", "logicTable", ",", "value", ")", ";", "databaseShardingOnly", "=", "false...
Add sharding value for database. <p>The sharding operator is {@code =}</p> @param logicTable logic table name @param value sharding value
[ "Add", "sharding", "value", "for", "database", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java#L82-L85
125,095
apache/incubator-shardingsphere
sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java
HintManager.addTableShardingValue
public void addTableShardingValue(final String logicTable, final Comparable<?> value) { tableShardingValues.put(logicTable, value); databaseShardingOnly = false; }
java
public void addTableShardingValue(final String logicTable, final Comparable<?> value) { tableShardingValues.put(logicTable, value); databaseShardingOnly = false; }
[ "public", "void", "addTableShardingValue", "(", "final", "String", "logicTable", ",", "final", "Comparable", "<", "?", ">", "value", ")", "{", "tableShardingValues", ".", "put", "(", "logicTable", ",", "value", ")", ";", "databaseShardingOnly", "=", "false", "...
Add sharding value for table. <p>The sharding operator is {@code =}</p> @param logicTable logic table name @param value sharding value
[ "Add", "sharding", "value", "for", "table", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java#L95-L98
125,096
apache/incubator-shardingsphere
sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java
HintManager.getDatabaseShardingValues
public static Collection<Comparable<?>> getDatabaseShardingValues(final String logicTable) { return null == HINT_MANAGER_HOLDER.get() ? Collections.<Comparable<?>>emptyList() : HINT_MANAGER_HOLDER.get().databaseShardingValues.get(logicTable); }
java
public static Collection<Comparable<?>> getDatabaseShardingValues(final String logicTable) { return null == HINT_MANAGER_HOLDER.get() ? Collections.<Comparable<?>>emptyList() : HINT_MANAGER_HOLDER.get().databaseShardingValues.get(logicTable); }
[ "public", "static", "Collection", "<", "Comparable", "<", "?", ">", ">", "getDatabaseShardingValues", "(", "final", "String", "logicTable", ")", "{", "return", "null", "==", "HINT_MANAGER_HOLDER", ".", "get", "(", ")", "?", "Collections", ".", "<", "Comparable...
Get database sharding values. @param logicTable logic table @return database sharding values
[ "Get", "database", "sharding", "values", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java#L115-L117
125,097
apache/incubator-shardingsphere
sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java
HintManager.getTableShardingValues
public static Collection<Comparable<?>> getTableShardingValues(final String logicTable) { return null == HINT_MANAGER_HOLDER.get() ? Collections.<Comparable<?>>emptyList() : HINT_MANAGER_HOLDER.get().tableShardingValues.get(logicTable); }
java
public static Collection<Comparable<?>> getTableShardingValues(final String logicTable) { return null == HINT_MANAGER_HOLDER.get() ? Collections.<Comparable<?>>emptyList() : HINT_MANAGER_HOLDER.get().tableShardingValues.get(logicTable); }
[ "public", "static", "Collection", "<", "Comparable", "<", "?", ">", ">", "getTableShardingValues", "(", "final", "String", "logicTable", ")", "{", "return", "null", "==", "HINT_MANAGER_HOLDER", ".", "get", "(", ")", "?", "Collections", ".", "<", "Comparable", ...
Get table sharding values. @param logicTable logic table name @return table sharding values
[ "Get", "table", "sharding", "values", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-api/src/main/java/org/apache/shardingsphere/api/hint/HintManager.java#L125-L127
125,098
apache/incubator-shardingsphere
sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/clause/UpdateSetItemsClauseParser.java
UpdateSetItemsClauseParser.parse
public void parse(final DMLStatement updateStatement) { lexerEngine.accept(DefaultKeyword.SET); do { parseSetItem(updateStatement); } while (lexerEngine.skipIfEqual(Symbol.COMMA)); }
java
public void parse(final DMLStatement updateStatement) { lexerEngine.accept(DefaultKeyword.SET); do { parseSetItem(updateStatement); } while (lexerEngine.skipIfEqual(Symbol.COMMA)); }
[ "public", "void", "parse", "(", "final", "DMLStatement", "updateStatement", ")", "{", "lexerEngine", ".", "accept", "(", "DefaultKeyword", ".", "SET", ")", ";", "do", "{", "parseSetItem", "(", "updateStatement", ")", ";", "}", "while", "(", "lexerEngine", "....
Parse set items. @param updateStatement DML statement
[ "Parse", "set", "items", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-parse/sharding-core-parse-common/src/main/java/org/apache/shardingsphere/core/parse/old/parser/clause/UpdateSetItemsClauseParser.java#L52-L57
125,099
apache/incubator-shardingsphere
sharding-core/sharding-core-execute/src/main/java/org/apache/shardingsphere/core/execute/sql/execute/result/QueryResultUtil.java
QueryResultUtil.getValueByColumnType
public static Object getValueByColumnType(final ResultSet resultSet, final int columnIndex) throws SQLException { ResultSetMetaData metaData = resultSet.getMetaData(); switch (metaData.getColumnType(columnIndex)) { case Types.BIT: case Types.BOOLEAN: return result...
java
public static Object getValueByColumnType(final ResultSet resultSet, final int columnIndex) throws SQLException { ResultSetMetaData metaData = resultSet.getMetaData(); switch (metaData.getColumnType(columnIndex)) { case Types.BIT: case Types.BOOLEAN: return result...
[ "public", "static", "Object", "getValueByColumnType", "(", "final", "ResultSet", "resultSet", ",", "final", "int", "columnIndex", ")", "throws", "SQLException", "{", "ResultSetMetaData", "metaData", "=", "resultSet", ".", "getMetaData", "(", ")", ";", "switch", "(...
Get value by column type. @param resultSet result set @param columnIndex column index @return column value @throws SQLException SQL exception
[ "Get", "value", "by", "column", "type", "." ]
f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-execute/src/main/java/org/apache/shardingsphere/core/execute/sql/execute/result/QueryResultUtil.java#L53-L94