MCPcopy Create free account
hub / github.com/Nemo1870/sql-parse / and

Method and

src/main/java/com/sql/parse/statement/impl/druid/Select.java:158–167  ·  view source on GitHub ↗

@title: and @desc "AND"符号

(SQLExpr where)

Source from the content-addressed store, hash-verified

156 * @desc "AND"符号
157 */
158 public Select and(SQLExpr where) {
159 SQLSelectQueryBlock queryBlock = select.getSelect().getQueryBlock();
160 SQLExpr oldWhere = queryBlock.getWhere();
161 if (oldWhere == null) {
162 throw BaseException.errorCode(SqlParseConstant.CODE_005);
163 } else {
164 queryBlock.setWhere(ExpressionBuilder.and(oldWhere, where));
165 }
166 return this;
167 }
168
169 public Select and(String expr) {
170 SQLExpr expression = ExpressionBuilder.parse(expr);

Callers

nothing calls this directly

Calls 5

errorCodeMethod · 0.95
andMethod · 0.95
parseMethod · 0.95
getWhereMethod · 0.80
getSelectMethod · 0.45

Tested by

no test coverage detected