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

Method or

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

@title: or @desc "OR"符号

(SQLExpr where)

Source from the content-addressed store, hash-verified

177 * @desc "OR"符号
178 */
179 public Select or(SQLExpr where) {
180 SQLSelectQueryBlock queryBlock = select.getSelect().getQueryBlock();
181 SQLExpr oldWhere = queryBlock.getWhere();
182 if (oldWhere == null) {
183 throw BaseException.errorCode(SqlParseConstant.CODE_006);
184 } else {
185 queryBlock.setWhere(ExpressionBuilder.or(oldWhere, where));
186 }
187 return this;
188 }
189
190 public Select or(String expr) {
191 SQLExpr expression = ExpressionBuilder.parse(expr);

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected