use of com.couchbase.client.java.query.dsl.path.MutateLimitPath in project jnosql-diana-driver by eclipse.
the class QueryConverter method delete.
static QueryConverterResult delete(DocumentDeleteQuery query, String bucket) {
JsonObject params = JsonObject.create();
List<String> ids = new ArrayList<>();
Expression condition = getCondition(query.getCondition().orElseThrow(() -> new IllegalArgumentException("Condigtion is required")), params, ids, query.getDocumentCollection());
MutateLimitPath statement = null;
if (nonNull(condition)) {
statement = Delete.deleteFrom(bucket).where(condition);
}
return new QueryConverterResult(params, statement, ids);
}
Aggregations