Package jakarta.nosql

Interface QueryMapper.MapperDeleteQueryBuild

All Known Subinterfaces:
QueryMapper.MapperDeleteFrom, QueryMapper.MapperDeleteWhere
Enclosing interface:
QueryMapper

public static interface QueryMapper.MapperDeleteQueryBuild
Represents the final execution step of the delete query fluent API.

This interface defines the terminal operation used to execute a delete query after all conditions have been specified.


 @Inject
 Template template;

 template.delete(Book.class)
     .where("author").eq("Ada")
     .and("publishedYear").gte(2020)
     .execute();
 
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the delete query based on the specified conditions.
  • Method Details

    • execute

      void execute()
      Executes the delete query based on the specified conditions. Use this method to remove entities from the database that match the defined criteria.
      
       template.delete(Book.class)
               .where("author").eq("Ada")
               .and("publishedYear").gte(2020)
               .execute();
       
      Throws:
      UnsupportedOperationException - if the underlying NoSQL database does not support a specific delete operation or query condition. For example, a wide-column database may not support the OR operator, or a document database may not support the BETWEEN operator. Support for delete operations and conditions varies depending on the database provider.