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

Docs: Delete by query

    XMLWordPrintable

Details

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

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: