MCPcopy Create free account
hub / github.com/apache/cayenne / execute

Method execute

cayenne/src/main/java/org/apache/cayenne/query/SQLExec.java:160–177  ·  view source on GitHub ↗
(ObjectContext context)

Source from the content-addressed store, hash-verified

158 }
159
160 public QueryResult execute(ObjectContext context) {
161
162 // TODO: switch ObjectContext to QueryResult instead of QueryResponse
163 // and create its own 'exec' method
164 QueryResponse response = context.performGenericQuery(this);
165
166 QueryResultBuilder builder = QueryResultBuilder.builder(response.size());
167 for (response.reset(); response.next(); ) {
168
169 if (response.isList()) {
170 builder.addSelectResult(response.currentList());
171 } else {
172 builder.addBatchUpdateResult(response.currentUpdateCount());
173 }
174 }
175
176 return builder.build();
177 }
178
179 public int update(ObjectContext context) {
180

Callers 2

updateMethod · 0.95
updateBatchMethod · 0.95

Calls 11

builderMethod · 0.95
sizeMethod · 0.95
resetMethod · 0.95
nextMethod · 0.95
isListMethod · 0.95
addSelectResultMethod · 0.95
currentListMethod · 0.95
addBatchUpdateResultMethod · 0.95
currentUpdateCountMethod · 0.95
buildMethod · 0.95
performGenericQueryMethod · 0.65

Tested by

no test coverage detected