Interface Dao<T,SB extends com.landawn.abacus.util.SQLBuilder,TD extends Dao<T,SB,TD>>

Type Parameters:
T -
SB - SQLBuilder used to generate sql scripts. Only can be SQLBuilder.PSC/PAC/PLC
TD -
All Known Subinterfaces:
CrudDao<T,ID,SB,TD>, CrudDaoL<T,SB,TD>, NoUpdateCrudDao<T,ID,SB,TD>, NoUpdateCrudDaoL<T,SB,TD>, NoUpdateDao<T,SB,TD>, ReadOnlyCrudDao<T,ID,SB,TD>, ReadOnlyCrudDaoL<T,SB,TD>, ReadOnlyDao<T,SB,TD>, UncheckedCrudDao<T,ID,SB,TD>, UncheckedCrudDaoL<T,SB,TD>, UncheckedDao<T,SB,TD>, UncheckedNoUpdateCrudDao<T,ID,SB,TD>, UncheckedNoUpdateCrudDaoL<T,SB,TD>, UncheckedNoUpdateDao<T,SB,TD>, UncheckedReadOnlyCrudDao<T,ID,SB,TD>, UncheckedReadOnlyCrudDaoL<T,SB,TD>, UncheckedReadOnlyDao<T,SB,TD>

public interface Dao<T,SB extends com.landawn.abacus.util.SQLBuilder,TD extends Dao<T,SB,TD>>
Performance Tips:
  • Avoid unnecessary/repeated database calls.
  • Only fetch the columns you need or update the columns you want.
  • Index is the key point in a lot of database performance issues.

  • This interface is designed to share/manager SQL queries by Java APIs/methods with static parameter types and return type, while hiding the SQL scripts. It's a gift from nature and created by thoughts.
    Note: Setting parameters by 'ParametersSetter' or Retrieving result/record by 'ResultExtractor/BiResultExtractor/RowMapper/BiRowMapper' is not enabled at present.
  • The SQL operations/methods should be annotated with SQL scripts by @Select/@Insert/@Update/@Delete/@NamedSelect/@NamedInsert/@NamedUpdate/@NamedDelete.
  • The Order of the parameters in the method should be consistent with parameter order in SQL scripts for parameterized SQL. For named parameterized SQL, the parameters must be binded with names through @Bind, or Map/Entity with getter/setter methods.
  • SQL parameters can be set through input method parameters(by multiple parameters or a Collection, or a Map/Entity for named sql), or by JdbcUtil.ParametersSetter<PreparedQuery/PreparedCallabeQuery...>.
  • ResultExtractor/BiResultExtractor/RowMapper/BiRowMapper can be specified by the last parameter of the method.
  • The return type of the method must be same as the return type of ResultExtractor/BiResultExtractor if it's specified by the last parameter of the method.
  • The return type of update/delete operations only can int/Integer/long/Long/boolean/Boolean/void. If it's long/Long, PreparedQuery#largeUpdate() will be called, otherwise, PreparedQuery#update() will be called.
  • Remember declaring throws SQLException in the method.

  • Which underline PreparedQuery/PreparedCallableQuery method to call for SQL methods/operations annotated with @Select/@NamedSelect:
    • If ResultExtractor/BiResultExtractor is specified by the last parameter of the method, PreparedQuery#query(ResultExtractor/BiResultExtractor) will be called.
    • Or else if RowMapper/BiRowMapper is specified by the last parameter of the method:
      • If the return type of the method is List and one of below conditions is matched, PreparedQuery#list(RowMapper/BiRowMapper) will be called:
        • The return type of the method is raw List without parameterized type, and the method name doesn't start with "get"/"findFirst"/"findOne"/"findOnlyOne".
        • The last parameter type is raw RowMapper/BiRowMapper without parameterized type, and the method name doesn't start with "get"/"findFirst"/"findOne"/"findOnlyOne".
        • The return type of the method is generic List with parameterized type and The last parameter type is generic RowMapper/BiRowMapper with parameterized types, but They're not same.
      • Or else if the return type of the method is ExceptionalStream/Stream, PreparedQuery#stream(RowMapper/BiRowMapper) will be called.
      • Or else if the return type of the method is Optional, PreparedQuery#findFirst(RowMapper/BiRowMapper) will be called.
      • Or else, PreparedQuery#findFirst(RowMapper/BiRowMapper).orElse(N.defaultValueOf(returnType)) will be called.
    • Or else:
      • If the return type of the method is DataSet, PreparedQuery#query() will be called.
      • Or else if the return type of the method is ExceptionalStream/Stream, PreparedQuery#stream(Class) will be called.
      • Or else if the return type of the method is Map or Entity class with getter/setter methods, PreparedQuery#findFirst(Class).orElseNull() will be called.
      • Or else if the return type of the method is Optional:
        • If the value type of Optional is Map, or Entity class with getter/setter methods, or List, or Object[], PreparedQuery#findFirst(Class) will be called.
        • Or else, PreparedQuery#queryForSingleNonNull(Class) will be called.
      • Or else if the return type of the method is Nullable:
        • If the value type of Nullable is Map, or Entity class with getter/setter methods, or List, or Object[], PreparedQuery#findFirst(Class) will be called.
        • Or else, PreparedQuery#queryForSingleResult(Class) will be called.
      • Or else if the return type of the method is OptionalBoolean/Byte/.../Double, PreparedQuery#queryForBoolean/Byte/...Double() will called.
      • Or else if the return type of the method is List, and the method name doesn't start with "get"/"findFirst"/"findOne"/"findOnlyOne", PreparedQuery#list(Class) will be called.
      • Or else if the return type of the method is boolean/Boolean, and the method name starts with "exist"/"exists"/"notExist"/"notExists", PreparedQuery#exists() or PreparedQuery#notExists() will be called.
      • Or else, PreparedQuery#queryForSingleResult(Class).orElse(N.defaultValueOf(returnType) will be called.


    Here is a simple UserDao sample.
     
     public static interface UserDao extends JdbcUtil.CrudDao<User, Long, SQLBuilder.PSC> {
         &#064NamedInsert("INSERT INTO user (id, first_name, last_name, email) VALUES (:id, :firstName, :lastName, :email)")
         void insertWithId(User user) throws SQLException;
    
         &#064NamedUpdate("UPDATE user SET first_name = :firstName, last_name = :lastName WHERE id = :id")
         int updateFirstAndLastName(@Bind("firstName") String newFirstName, @Bind("lastName") String newLastName, @Bind("id") long id) throws SQLException;
    
         &#064NamedSelect("SELECT first_name, last_name FROM user WHERE id = :id")
         User getFirstAndLastNameBy(@Bind("id") long id) throws SQLException;
    
         &#064NamedSelect("SELECT id, first_name, last_name, email FROM user")
         Stream allUsers() throws SQLException;
     }
     
     
    Here is the generate way to work with transaction started by SQLExecutor.
     
     static final UserDao userDao = Dao.newInstance(UserDao.class, dataSource);
     ...
    
     final SQLTransaction tran = JdbcUtil.beginTransaction(dataSource, IsolationLevel.READ_COMMITTED);
    
     try {
          userDao.getById(id);
          userDao.update(...);
          // more...
    
          tran.commit();
     } finally {
          // The connection will be automatically closed after the transaction is committed or rolled back.
          tran.rollbackIfNotCommitted();
     }
     
     
  • See Also:
    • Method Summary

      Modifier and Type
      Method
      Description
      default <R> com.landawn.abacus.util.ContinuableFuture<R>
      asyncCall(com.landawn.abacus.util.Throwables.Function<TD,R,SQLException> sqlAction)
      Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
      default <R> com.landawn.abacus.util.ContinuableFuture<R>
      asyncCall(com.landawn.abacus.util.Throwables.Function<TD,R,SQLException> sqlAction, Executor executor)
      Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
      com.landawn.abacus.util.AsyncExecutor
      Deprecated.
      for internal use only.
      default com.landawn.abacus.util.ContinuableFuture<Void>
      asyncRun(com.landawn.abacus.util.Throwables.Consumer<TD,SQLException> sqlAction)
      Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
      default com.landawn.abacus.util.ContinuableFuture<Void>
      asyncRun(com.landawn.abacus.util.Throwables.Consumer<TD,SQLException> sqlAction, Executor executor)
      Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
      default void
      batchSave(String namedInsertSQL, Collection<? extends T> entitiesToSave)
      Insert the specified entities to database by batch.
      void
      batchSave(String namedInsertSQL, Collection<? extends T> entitiesToSave, int batchSize)
      Insert the specified entities to database by batch.
      default void
      batchSave(Collection<? extends T> entitiesToSave)
      Insert the specified entities to database by batch.
      void
      batchSave(Collection<? extends T> entitiesToSave, int batchSize)
      Insert the specified entities to database by batch.
      default void
      batchSave(Collection<? extends T> entitiesToSave, Collection<String> propNamesToSave)
      Insert the specified entities to database by batch.
      void
      batchSave(Collection<? extends T> entitiesToSave, Collection<String> propNamesToSave, int batchSize)
      Insert the specified entities to database by batch.
      int
      count(com.landawn.abacus.condition.Condition cond)
       
       
      int
      delete(com.landawn.abacus.condition.Condition cond)
       
      Deprecated.
      for internal use only.
      boolean
      exists(com.landawn.abacus.condition.Condition cond)
       
      com.landawn.abacus.util.u.Optional<T>
      findFirst(com.landawn.abacus.condition.Condition cond)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findFirst(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findFirst(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
       
      com.landawn.abacus.util.u.Optional<T>
      findFirst(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findFirst(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findFirst(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
       
      com.landawn.abacus.util.u.Optional<T>
      findOnlyOne(com.landawn.abacus.condition.Condition cond)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findOnlyOne(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findOnlyOne(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
       
      com.landawn.abacus.util.u.Optional<T>
      findOnlyOne(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findOnlyOne(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> com.landawn.abacus.util.u.Optional<R>
      findOnlyOne(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
       
      default void
      foreach(com.landawn.abacus.condition.Condition cond, Consumer<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> rowConsumer)
       
      default void
      foreach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Consumer<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> rowConsumer)
       
      void
      forEach(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowConsumer rowConsumer)
       
      void
      forEach(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowConsumer rowConsumer)
       
      void
      forEach(com.landawn.abacus.condition.Condition cond, Jdbc.RowConsumer rowConsumer)
       
      void
      forEach(com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowConsumer rowConsumer)
       
      void
      forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowConsumer rowConsumer)
       
      void
      forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowConsumer rowConsumer)
       
      void
      forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowConsumer rowConsumer)
       
      void
      forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowConsumer rowConsumer)
       
      list(com.landawn.abacus.condition.Condition cond)
       
      <R> List<R>
      list(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> List<R>
      list(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> List<R>
      list(com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
       
      <R> List<R>
      list(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
       
      default <R> List<R>
      list(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
       
      default <R> List<R>
      list(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
       
      default <R> List<R>
      list(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
       
      list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
       
      <R> List<R>
      list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> List<R>
      list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
       
      <R> List<R>
      list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
       
      <R> List<R>
      list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
       
      default boolean
      notExists(com.landawn.abacus.condition.Condition cond)
       
       
      prepareCallableQuery(String sql, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,CallableStatement,SQLException> stmtCreator)
       
      default NamedQuery
      prepareNamedQuery(com.landawn.abacus.condition.Condition cond)
      Prepare a select query by specified cond.
      default NamedQuery
      prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedSql)
       
      default NamedQuery
      prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedSql, boolean generateKeys)
       
      default NamedQuery
      prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedQuery, int[] returnColumnIndexes)
       
      default NamedQuery
      prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedSql, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,PreparedStatement,SQLException> stmtCreator)
       
      default NamedQuery
      prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedQuery, String[] returnColumnNames)
       
      default NamedQuery
       
      default NamedQuery
      prepareNamedQuery(String namedQuery, boolean generateKeys)
       
      default NamedQuery
      prepareNamedQuery(String namedQuery, int[] returnColumnIndexes)
       
      default NamedQuery
      prepareNamedQuery(String namedQuery, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,PreparedStatement,SQLException> stmtCreator)
       
      default NamedQuery
      prepareNamedQuery(String namedQuery, String[] returnColumnNames)
       
      default NamedQuery
      prepareNamedQuery(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
      Prepare a select query by specified selectPropNames and cond.
      default NamedQuery
      prepareNamedQueryForBigResult(com.landawn.abacus.condition.Condition cond)
      Prepare a big result select query by specified cond.
      default NamedQuery
       
      default NamedQuery
      prepareNamedQueryForBigResult(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
      Prepare a big result select query by specified selectPropNames and cond.
      prepareQuery(com.landawn.abacus.condition.Condition cond)
      Prepare a select query by specified cond.
       
      prepareQuery(String query, boolean generateKeys)
       
      prepareQuery(String query, int[] returnColumnIndexes)
       
      prepareQuery(String sql, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,PreparedStatement,SQLException> stmtCreator)
       
      prepareQuery(String query, String[] returnColumnNames)
       
      prepareQuery(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
      Prepare a select query by specified selectPropNames and cond.
      prepareQueryForBigResult(com.landawn.abacus.condition.Condition cond)
      Prepare a big result select query by specified cond.
       
      prepareQueryForBigResult(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
      Prepare a big result select query by specified selectPropNames and cond.
      com.landawn.abacus.util.DataSet
      query(com.landawn.abacus.condition.Condition cond)
       
      <R> R
      query(com.landawn.abacus.condition.Condition cond, Jdbc.BiResultExtractor<? extends R> resultExtractor)
       
      <R> R
      query(com.landawn.abacus.condition.Condition cond, Jdbc.ResultExtractor<? extends R> resultExtractor)
       
      com.landawn.abacus.util.DataSet
      query(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
       
      <R> R
      query(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiResultExtractor<? extends R> resultExtractor)
       
      <R> R
      query(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.ResultExtractor<? extends R> resultExtractor)
       
      com.landawn.abacus.util.u.OptionalBoolean
      queryForBoolean(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalBoolean describing the value in the first row/column if it exists, otherwise return an empty OptionalBoolean.
      com.landawn.abacus.util.u.OptionalByte
      queryForByte(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalByte describing the value in the first row/column if it exists, otherwise return an empty OptionalByte.
      com.landawn.abacus.util.u.Nullable<byte[]>
      queryForBytes(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns a Nullable<byte[]> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
      com.landawn.abacus.util.u.OptionalChar
      queryForChar(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalChar describing the value in the first row/column if it exists, otherwise return an empty OptionalChar.
      com.landawn.abacus.util.u.Nullable<Date>
      queryForDate(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns a Nullable<java.sql.Date> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
      com.landawn.abacus.util.u.OptionalDouble
      queryForDouble(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalDouble describing the value in the first row/column if it exists, otherwise return an empty OptionalDouble.
      com.landawn.abacus.util.u.OptionalFloat
      queryForFloat(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalFloat describing the value in the first row/column if it exists, otherwise return an empty OptionalFloat.
      com.landawn.abacus.util.u.OptionalInt
      queryForInt(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalInt describing the value in the first row/column if it exists, otherwise return an empty OptionalInt.
      com.landawn.abacus.util.u.OptionalLong
      queryForLong(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalLong describing the value in the first row/column if it exists, otherwise return an empty OptionalLong.
      com.landawn.abacus.util.u.OptionalShort
      queryForShort(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an OptionalShort describing the value in the first row/column if it exists, otherwise return an empty OptionalShort.
      <V> com.landawn.abacus.util.u.Optional<V>
      queryForSingleNonNull(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
      <V> com.landawn.abacus.util.u.Optional<V>
      queryForSingleNonNull(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends V> rowMapper)
      Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
      <V> com.landawn.abacus.util.u.Nullable<V>
      queryForSingleResult(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns a Nullable<V> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
      com.landawn.abacus.util.u.Nullable<String>
      queryForString(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns a Nullable<String> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
      com.landawn.abacus.util.u.Nullable<Time>
      queryForTime(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns a Nullable<java.sql.Time> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
      com.landawn.abacus.util.u.Nullable<Timestamp>
      queryForTimestamp(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns a Nullable<java.sql.Timestamp> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
      <V> com.landawn.abacus.util.u.Optional<V>
      queryForUniqueNonNull(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
      <V> com.landawn.abacus.util.u.Optional<V>
      queryForUniqueNonNull(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends V> rowMapper)
      Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
      <V> com.landawn.abacus.util.u.Nullable<V>
      queryForUniqueResult(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Returns a Nullable describing the value in the first row/column if it exists, otherwise return an empty Nullable.
      void
      save(String namedInsertSQL, T entityToSave)
       
      void
      save(T entityToSave)
       
      void
      save(T entityToSave, Collection<String> propNamesToSave)
       
      com.landawn.abacus.util.SQLMapper
       
      com.landawn.abacus.util.ExceptionalStream<T,SQLException>
      stream(com.landawn.abacus.condition.Condition cond)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
      lazy-execution, lazy-fetch.
      default <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
      Lazy execution, lazy fetching.
      default <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      default <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      com.landawn.abacus.util.ExceptionalStream<T,SQLException>
      stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException>
      stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
      Lazy execution, lazy fetching.
      Deprecated.
      for internal use only.
      default int
      update(String propName, Object propValue, com.landawn.abacus.condition.Condition cond)
       
      int
      update(Map<String,Object> updateProps, com.landawn.abacus.condition.Condition cond)
      Update all the records found by specified cond with all the properties from specified updateProps.
      default int
      update(T entity, com.landawn.abacus.condition.Condition cond)
      Update all the records found by specified cond with the properties from specified entity.
      int
      update(T entity, Collection<String> propNamesToUpdate, com.landawn.abacus.condition.Condition cond)
      Update all the records found by specified cond with specified propNamesToUpdate from specified entity.
      default T
      upsert(T entity, com.landawn.abacus.condition.Condition cond)
      Execute add and return the added entity if the record doesn't, otherwise, update is executed and updated db record is returned.
    • Method Details

      • dataSource

        DataSource dataSource()
        Returns:
      • sqlMapper

        com.landawn.abacus.util.SQLMapper sqlMapper()
        Returns:
      • targetEntityClass

        @Deprecated @Internal Class<T> targetEntityClass()
        Deprecated.
        for internal use only.
        Returns:
      • executor

        @Deprecated @Internal Executor executor()
        Deprecated.
        for internal use only.
        Returns:
      • asyncExecutor

        @Deprecated @Internal com.landawn.abacus.util.AsyncExecutor asyncExecutor()
        Deprecated.
        for internal use only.
        Returns:
      • prepareQuery

        @Beta default PreparedQuery prepareQuery(String query) throws SQLException
        Parameters:
        query -
        Returns:
        Throws:
        SQLException
      • prepareQuery

        @Beta default PreparedQuery prepareQuery(String query, boolean generateKeys) throws SQLException
        Parameters:
        query -
        generateKeys -
        Returns:
        Throws:
        SQLException
      • prepareQuery

        @Beta default PreparedQuery prepareQuery(String query, int[] returnColumnIndexes) throws SQLException
        Parameters:
        query -
        returnColumnIndexes -
        Returns:
        Throws:
        SQLException
      • prepareQuery

        @Beta default PreparedQuery prepareQuery(String query, String[] returnColumnNames) throws SQLException
        Parameters:
        query -
        returnColumnNames -
        Returns:
        Throws:
        SQLException
      • prepareQuery

        @Beta default PreparedQuery prepareQuery(String sql, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,PreparedStatement,SQLException> stmtCreator) throws SQLException
        Parameters:
        sql -
        stmtCreator -
        Returns:
        Throws:
        SQLException
      • prepareQueryForBigResult

        @Beta default PreparedQuery prepareQueryForBigResult(String query) throws SQLException
        Parameters:
        query -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(String namedQuery) throws SQLException
        Parameters:
        namedQuery -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(String namedQuery, boolean generateKeys) throws SQLException
        Parameters:
        namedQuery -
        generateKeys -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(String namedQuery, int[] returnColumnIndexes) throws SQLException
        Parameters:
        namedQuery -
        returnColumnIndexes -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(String namedQuery, String[] returnColumnNames) throws SQLException
        Parameters:
        namedQuery -
        returnColumnNames -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(String namedQuery, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,PreparedStatement,SQLException> stmtCreator) throws SQLException
        Parameters:
        namedQuery -
        stmtCreator -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedSql) throws SQLException
        Parameters:
        namedSql - the named query
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedSql, boolean generateKeys) throws SQLException
        Parameters:
        namedSql - the named query
        generateKeys -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedQuery, int[] returnColumnIndexes) throws SQLException
        Parameters:
        namedQuery -
        returnColumnIndexes -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedQuery, String[] returnColumnNames) throws SQLException
        Parameters:
        namedQuery -
        returnColumnNames -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(com.landawn.abacus.util.ParsedSql namedSql, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,PreparedStatement,SQLException> stmtCreator) throws SQLException
        Parameters:
        namedSql - the named query
        stmtCreator -
        Returns:
        Throws:
        SQLException
      • prepareNamedQueryForBigResult

        @Beta default NamedQuery prepareNamedQueryForBigResult(String namedQuery) throws SQLException
        Parameters:
        namedQuery -
        Returns:
        Throws:
        SQLException
      • prepareCallableQuery

        @Beta default PreparedCallableQuery prepareCallableQuery(String query) throws SQLException
        Parameters:
        query -
        Returns:
        Throws:
        SQLException
      • prepareCallableQuery

        @Beta default PreparedCallableQuery prepareCallableQuery(String sql, com.landawn.abacus.util.Throwables.BiFunction<Connection,String,CallableStatement,SQLException> stmtCreator) throws SQLException
        Parameters:
        sql -
        stmtCreator -
        Returns:
        Throws:
        SQLException
      • prepareQuery

        @Beta default PreparedQuery prepareQuery(com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a select query by specified cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
      • prepareQuery

        @Beta default PreparedQuery prepareQuery(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a select query by specified selectPropNames and cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        selectPropNames -
        cond -
        Returns:
        Throws:
        SQLException
      • prepareQueryForBigResult

        @Beta default PreparedQuery prepareQueryForBigResult(com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a big result select query by specified cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
      • prepareQueryForBigResult

        @Beta default PreparedQuery prepareQueryForBigResult(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a big result select query by specified selectPropNames and cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        selectPropNames -
        cond -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a select query by specified cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
      • prepareNamedQuery

        @Beta default NamedQuery prepareNamedQuery(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a select query by specified selectPropNames and cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        selectPropNames -
        cond -
        Returns:
        Throws:
        SQLException
      • prepareNamedQueryForBigResult

        @Beta default NamedQuery prepareNamedQueryForBigResult(com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a big result select query by specified cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
      • prepareNamedQueryForBigResult

        @Beta default NamedQuery prepareNamedQueryForBigResult(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws SQLException
        Prepare a big result select query by specified selectPropNames and cond.
        query could be a select/insert/update/delete or other sql statement. If it's select by default if not specified.
        Parameters:
        selectPropNames -
        cond -
        Returns:
        Throws:
        SQLException
      • save

        void save(T entityToSave) throws SQLException
        Parameters:
        entityToSave -
        Throws:
        SQLException
      • save

        void save(T entityToSave, Collection<String> propNamesToSave) throws SQLException
        Parameters:
        entityToSave -
        propNamesToSave -
        Throws:
        SQLException
      • save

        void save(String namedInsertSQL, T entityToSave) throws SQLException
        Parameters:
        namedInsertSQL -
        entityToSave -
        Throws:
        SQLException
      • batchSave

        default void batchSave(Collection<? extends T> entitiesToSave) throws SQLException
        Insert the specified entities to database by batch.
        Parameters:
        entitiesToSave -
        Throws:
        SQLException
        See Also:
      • batchSave

        void batchSave(Collection<? extends T> entitiesToSave, int batchSize) throws SQLException
        Insert the specified entities to database by batch.
        Parameters:
        entitiesToSave -
        batchSize -
        Throws:
        SQLException
        See Also:
      • batchSave

        default void batchSave(Collection<? extends T> entitiesToSave, Collection<String> propNamesToSave) throws SQLException
        Insert the specified entities to database by batch.
        Parameters:
        entitiesToSave -
        propNamesToSave -
        Throws:
        SQLException
        See Also:
      • batchSave

        void batchSave(Collection<? extends T> entitiesToSave, Collection<String> propNamesToSave, int batchSize) throws SQLException
        Insert the specified entities to database by batch.
        Parameters:
        entitiesToSave -
        propNamesToSave -
        batchSize -
        Throws:
        SQLException
        See Also:
      • batchSave

        @Beta default void batchSave(String namedInsertSQL, Collection<? extends T> entitiesToSave) throws SQLException
        Insert the specified entities to database by batch.
        Parameters:
        namedInsertSQL -
        entitiesToSave -
        Throws:
        SQLException
        See Also:
      • batchSave

        @Beta void batchSave(String namedInsertSQL, Collection<? extends T> entitiesToSave, int batchSize) throws SQLException
        Insert the specified entities to database by batch.
        Parameters:
        namedInsertSQL -
        entitiesToSave -
        batchSize -
        Throws:
        SQLException
        See Also:
      • exists

        boolean exists(com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        cond -
        Returns:
        true, if there is at least one record found.
        Throws:
        SQLException
        See Also:
      • notExists

        @Beta default boolean notExists(com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        cond -
        Returns:
        true, if there is no record found.
        Throws:
        SQLException
        See Also:
      • count

        int count(com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findFirst

        com.landawn.abacus.util.u.Optional<T> findFirst(com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findFirst

        <R> com.landawn.abacus.util.u.Optional<R> findFirst(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findFirst

        <R> com.landawn.abacus.util.u.Optional<R> findFirst(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper) throws SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findFirst

        com.landawn.abacus.util.u.Optional<T> findFirst(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findFirst

        <R> com.landawn.abacus.util.u.Optional<R> findFirst(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findFirst

        <R> com.landawn.abacus.util.u.Optional<R> findFirst(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper) throws SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findOnlyOne

        com.landawn.abacus.util.u.Optional<T> findOnlyOne(com.landawn.abacus.condition.Condition cond) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
        Parameters:
        cond -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findOnlyOne

        <R> com.landawn.abacus.util.u.Optional<R> findOnlyOne(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findOnlyOne

        <R> com.landawn.abacus.util.u.Optional<R> findOnlyOne(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findOnlyOne

        com.landawn.abacus.util.u.Optional<T> findOnlyOne(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • findOnlyOne

        <R> com.landawn.abacus.util.u.Optional<R> findOnlyOne(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
      • findOnlyOne

        <R> com.landawn.abacus.util.u.Optional<R> findOnlyOne(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException, NullPointerException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        NullPointerException - if rowMapper returns null for the found record.
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • queryForBoolean

        com.landawn.abacus.util.u.OptionalBoolean queryForBoolean(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalBoolean describing the value in the first row/column if it exists, otherwise return an empty OptionalBoolean.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForChar

        com.landawn.abacus.util.u.OptionalChar queryForChar(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalChar describing the value in the first row/column if it exists, otherwise return an empty OptionalChar.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForByte

        com.landawn.abacus.util.u.OptionalByte queryForByte(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalByte describing the value in the first row/column if it exists, otherwise return an empty OptionalByte.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForShort

        com.landawn.abacus.util.u.OptionalShort queryForShort(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalShort describing the value in the first row/column if it exists, otherwise return an empty OptionalShort.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForInt

        com.landawn.abacus.util.u.OptionalInt queryForInt(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalInt describing the value in the first row/column if it exists, otherwise return an empty OptionalInt.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForLong

        com.landawn.abacus.util.u.OptionalLong queryForLong(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalLong describing the value in the first row/column if it exists, otherwise return an empty OptionalLong.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForFloat

        com.landawn.abacus.util.u.OptionalFloat queryForFloat(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalFloat describing the value in the first row/column if it exists, otherwise return an empty OptionalFloat.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForDouble

        com.landawn.abacus.util.u.OptionalDouble queryForDouble(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an OptionalDouble describing the value in the first row/column if it exists, otherwise return an empty OptionalDouble.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForString

        com.landawn.abacus.util.u.Nullable<String> queryForString(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns a Nullable<String> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForDate

        com.landawn.abacus.util.u.Nullable<Date> queryForDate(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns a Nullable<java.sql.Date> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForTime

        com.landawn.abacus.util.u.Nullable<Time> queryForTime(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns a Nullable<java.sql.Time> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForTimestamp

        com.landawn.abacus.util.u.Nullable<Timestamp> queryForTimestamp(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns a Nullable<java.sql.Timestamp> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForBytes

        com.landawn.abacus.util.u.Nullable<byte[]> queryForBytes(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns a Nullable<byte[]> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForSingleResult

        <V> com.landawn.abacus.util.u.Nullable<V> queryForSingleResult(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns a Nullable<V> describing the value in the first row/column if it exists, otherwise return an empty Nullable.
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForSingleNonNull

        <V> com.landawn.abacus.util.u.Optional<V> queryForSingleNonNull(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
        Type Parameters:
        V - the value type
        Parameters:
        targetValueClass -
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForSingleNonNull

        @Beta <V> com.landawn.abacus.util.u.Optional<V> queryForSingleNonNull(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends V> rowMapper) throws SQLException
        Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
        Type Parameters:
        V - the value type
        Parameters:
        singleSelectPropName -
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
      • queryForUniqueResult

        <V> com.landawn.abacus.util.u.Nullable<V> queryForUniqueResult(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
        Returns a Nullable describing the value in the first row/column if it exists, otherwise return an empty Nullable. And throws DuplicatedResultException if more than one record found.
        Type Parameters:
        V - the value type
        Parameters:
        targetValueClass -
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        See Also:
      • queryForUniqueNonNull

        <V> com.landawn.abacus.util.u.Optional<V> queryForUniqueNonNull(Class<? extends V> targetValueClass, String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
        Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
        Type Parameters:
        V - the value type
        Parameters:
        targetValueClass -
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        See Also:
      • queryForUniqueNonNull

        @Beta <V> com.landawn.abacus.util.u.Optional<V> queryForUniqueNonNull(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends V> rowMapper) throws com.landawn.abacus.exception.DuplicatedResultException, SQLException
        Returns an Optional describing the value in the first row/column if it exists, otherwise return an empty Optional.
        Type Parameters:
        V - the value type
        Parameters:
        singleSelectPropName -
        cond -
        rowMapper -
        Returns:
        Throws:
        com.landawn.abacus.exception.DuplicatedResultException - if more than one record found by the specified id (or condition).
        SQLException
        See Also:
      • query

        com.landawn.abacus.util.DataSet query(com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • query

        com.landawn.abacus.util.DataSet query(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • query

        <R> R query(com.landawn.abacus.condition.Condition cond, Jdbc.ResultExtractor<? extends R> resultExtractor) throws SQLException
        Type Parameters:
        R -
        Parameters:
        cond -
        resultExtractor - Don't save/return ResultSet. It will be closed after this call.
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • query

        <R> R query(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.ResultExtractor<? extends R> resultExtractor) throws SQLException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        resultExtractor - Don't save/return ResultSet. It will be closed after this call.
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • query

        <R> R query(com.landawn.abacus.condition.Condition cond, Jdbc.BiResultExtractor<? extends R> resultExtractor) throws SQLException
        Type Parameters:
        R -
        Parameters:
        cond -
        resultExtractor - Don't save/return ResultSet. It will be closed after this call.
        Returns:
        Throws:
        SQLException
      • query

        <R> R query(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiResultExtractor<? extends R> resultExtractor) throws SQLException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        resultExtractor - Don't save/return ResultSet. It will be closed after this call.
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        List<T> list(com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowFilter -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        cond -
        rowFilter -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        List<T> list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowFilter -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        <R> List<R> list(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowFilter -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        default <R> List<R> list(String singleSelectPropName, com.landawn.abacus.condition.Condition cond) throws SQLException
        Type Parameters:
        R -
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        default <R> List<R> list(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        singleSelectPropName -
        cond -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • list

        default <R> List<R> list(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper) throws SQLException
        Type Parameters:
        R -
        Parameters:
        singleSelectPropName -
        cond -
        rowFilter -
        rowMapper -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        com.landawn.abacus.util.ExceptionalStream<T,SQLException> stream(com.landawn.abacus.condition.Condition cond)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Parameters:
        cond -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
        lazy-execution, lazy-fetch.
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        cond -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        cond -
        rowFilter -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        cond -
        rowFilter -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        com.landawn.abacus.util.ExceptionalStream<T,SQLException> stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowFilter -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        selectPropNames - all properties(columns) will be selected, excluding the properties of joining entities, if the specified selectPropNames is null.
        cond -
        rowFilter -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        default <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(String singleSelectPropName, com.landawn.abacus.condition.Condition cond)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        singleSelectPropName -
        cond -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        default <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        singleSelectPropName -
        cond -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • stream

        default <R> com.landawn.abacus.util.ExceptionalStream<R,SQLException> stream(String singleSelectPropName, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowMapper<? extends R> rowMapper)
        Lazy execution, lazy fetching. No connection fetching/creating, no statement preparing or execution, no result fetching until @TerminalOp or @TerminalOpTriggered stream operation is called.
        Type Parameters:
        R -
        Parameters:
        singleSelectPropName -
        cond -
        rowFilter -
        rowMapper -
        Returns:
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(com.landawn.abacus.condition.Condition cond, Jdbc.RowConsumer rowConsumer) throws SQLException
        Parameters:
        cond -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowConsumer rowConsumer) throws SQLException
        Parameters:
        cond -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowConsumer rowConsumer) throws SQLException
        Parameters:
        cond -
        rowFilter -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowConsumer rowConsumer) throws SQLException
        Parameters:
        cond -
        rowFilter -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowConsumer rowConsumer) throws SQLException
        Parameters:
        selectPropNames -
        cond -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowConsumer rowConsumer) throws SQLException
        Parameters:
        selectPropNames -
        cond -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.RowFilter rowFilter, Jdbc.RowConsumer rowConsumer) throws SQLException
        Parameters:
        selectPropNames -
        cond -
        rowFilter -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • forEach

        void forEach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Jdbc.BiRowFilter rowFilter, Jdbc.BiRowConsumer rowConsumer) throws SQLException
        Parameters:
        selectPropNames -
        cond -
        rowFilter -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • foreach

        @Beta default void foreach(Collection<String> selectPropNames, com.landawn.abacus.condition.Condition cond, Consumer<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> rowConsumer) throws SQLException
        Parameters:
        selectPropNames -
        cond -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • foreach

        @Beta default void foreach(com.landawn.abacus.condition.Condition cond, Consumer<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> rowConsumer) throws SQLException
        Parameters:
        cond -
        rowConsumer -
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • update

        default int update(String propName, Object propValue, com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        propName -
        propValue -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • update

        int update(Map<String,Object> updateProps, com.landawn.abacus.condition.Condition cond) throws SQLException
        Update all the records found by specified cond with all the properties from specified updateProps.
        Parameters:
        updateProps -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • update

        default int update(T entity, com.landawn.abacus.condition.Condition cond) throws SQLException
        Update all the records found by specified cond with the properties from specified entity.
        Parameters:
        entity -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • update

        int update(T entity, Collection<String> propNamesToUpdate, com.landawn.abacus.condition.Condition cond) throws SQLException
        Update all the records found by specified cond with specified propNamesToUpdate from specified entity.
        Parameters:
        entity -
        propNamesToUpdate -
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • upsert

        default T upsert(T entity, com.landawn.abacus.condition.Condition cond) throws SQLException
        Execute add and return the added entity if the record doesn't, otherwise, update is executed and updated db record is returned.
        Parameters:
        entity -
        cond - to verify if the record exists or not.
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • delete

        int delete(com.landawn.abacus.condition.Condition cond) throws SQLException
        Parameters:
        cond -
        Returns:
        Throws:
        SQLException
        See Also:
        • ConditionFactory
        • ConditionFactory.CF
      • asyncCall

        @Beta default <R> com.landawn.abacus.util.ContinuableFuture<R> asyncCall(com.landawn.abacus.util.Throwables.Function<TD,R,SQLException> sqlAction)
        Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
        Type Parameters:
        R -
        Parameters:
        sqlAction -
        Returns:
      • asyncCall

        @Beta default <R> com.landawn.abacus.util.ContinuableFuture<R> asyncCall(com.landawn.abacus.util.Throwables.Function<TD,R,SQLException> sqlAction, Executor executor)
        Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
        Type Parameters:
        R -
        Parameters:
        sqlAction -
        executor -
        Returns:
      • asyncRun

        @Beta default com.landawn.abacus.util.ContinuableFuture<Void> asyncRun(com.landawn.abacus.util.Throwables.Consumer<TD,SQLException> sqlAction)
        Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
        Parameters:
        sqlAction -
        Returns:
      • asyncRun

        @Beta default com.landawn.abacus.util.ContinuableFuture<Void> asyncRun(com.landawn.abacus.util.Throwables.Consumer<TD,SQLException> sqlAction, Executor executor)
        Any transaction started in current thread won't be automatically applied to specified sqlAction which will be executed in another thread.
        Parameters:
        sqlAction -
        executor -
        Returns: