Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13389

Docs: Delete by query

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 13.0.1.Final
    • None
    • Documentation
    • None

      The syntax is similar to JPQL: DELETE FROM entityName [WHERE condition].
      A single entity name can be referenced (no joins of any kind). The WHERE condition is optional. Projections (aka SELECT), grouping, aggregations (AVG, MAX, ... functions) and ORDER BY are not allowed.

      A DELETE statement can be executed using the newly added Query.executeStatement, which will return the number of deleted entities, an int.

      Alternatively, a DELETE statement can also be executed via the usual Query.execute method and the returned QueryResult will have a hitCount equal to the number of deleted entities but no actual results (QueryResult.list() will return an empty list).

              dnaro@redhat.com Donald Naro
              dnaro@redhat.com Donald Naro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: