MCPcopy Index your code
hub / github.com/wyouflf/xUtils3 / toString

Method toString

xutils/src/main/java/org/xutils/db/Selector.java:201–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199 }
200
201 @Override
202 public String toString() {
203 StringBuilder result = new StringBuilder();
204 result.append("SELECT ");
205 result.append("*");
206 result.append(" FROM ").append("\"").append(table.getName()).append("\"");
207 if (whereBuilder != null && whereBuilder.getWhereItemSize() > 0) {
208 result.append(" WHERE ").append(whereBuilder.toString());
209 }
210 if (orderByList != null && orderByList.size() > 0) {
211 result.append(" ORDER BY ");
212 for (OrderBy orderBy : orderByList) {
213 result.append(orderBy.toString()).append(',');
214 }
215 result.deleteCharAt(result.length() - 1);
216 }
217 if (limit > 0) {
218 result.append(" LIMIT ").append(limit);
219 result.append(" OFFSET ").append(offset);
220 }
221 return result.toString();
222 }
223
224 public static class OrderBy {
225 private String columnName;

Callers 3

findFirstMethod · 0.95
findAllMethod · 0.95
findByIdMethod · 0.45

Calls 3

getWhereItemSizeMethod · 0.80
getNameMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected