Class CacheDriverExecutor

java.lang.Object
com.killcoding.datasource.DriverExecutor
com.killcoding.datasource.CacheDriverExecutor

public final class CacheDriverExecutor extends DriverExecutor
This class uses a 'CacheArray' to process the asynchronous processing method of the data query result set. If you choose to use the mode 'DiskCache', temporary files will be generated. If you choose to use the mode 'MemoryCache', temporary files will not be generated but the physical memory size must be considered.
  • Field Details

  • Constructor Details

    • CacheDriverExecutor

      public CacheDriverExecutor(Connection connection)
      New a object CacheDriverExecutor
      Parameters:
      connection - - it is jdbc connection
  • Method Details

    • find

      public void find(String sql, List<Object> params, CacheArray rows) throws SQLException
      This is full table query function
      Parameters:
      sql - - Query sql
      params - - Query params
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • find

      public void find(String sql, Map<String,Object> params, CacheArray rows) throws SQLException
      This is full table query function
      Parameters:
      sql - - Query sql
      params - - Query params
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • find

      public void find(String sql, CacheArray rows) throws SQLException
      This is full table query function
      Parameters:
      sql - - Query sql
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • find

      public void find(int cursorStart, int maxRows, String sql, CacheArray rows) throws SQLException
      This is limited rows query function
      Parameters:
      cursorStart - - JDBC result Cursor start index
      maxRows - - JDBC result max rows (JDBC limited rows 50,000,000)
      sql - - Query sql
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • find

      public void find(int cursorStart, int maxRows, String sql, Map<String,Object> params, CacheArray rows) throws SQLException
      This is limited rows query function (use Map param mode)
      Parameters:
      cursorStart - - JDBC result Cursor start index
      maxRows - - JDBC result max rows (JDBC limited rows 50,000,000)
      sql - - Query sql
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • find

      public void find(int cursorStart, int maxRows, String sql, List<Object> params, CacheArray rows) throws SQLException
      This is limited rows query function (use List param mode)
      Parameters:
      cursorStart - - JDBC result Cursor start index
      maxRows - - JDBC result max rows (JDBC limited rows 50,000,000)
      sql - - Query sql
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • callAndReturnList

      public void callAndReturnList(int cursorStart, int maxRows, String sql, CacheArray rows) throws SQLException
      Execute stored proc(and return result to CacheArray)
      Parameters:
      cursorStart - - JDBC result Cursor start index
      maxRows - - JDBC result max rows (JDBC limited rows 50,000,000)
      sql - - Query sql
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • callAndReturnList

      public void callAndReturnList(int cursorStart, int maxRows, String sql, Map<String,Object> params, CacheArray rows) throws SQLException
      Execute stored proc(and return result)
      Parameters:
      cursorStart - - JDBC result Cursor start index
      maxRows - - JDBC result max rows (JDBC limited rows 50,000,000)
      sql - - Query sql
      params - - Use Map param mode (use ':column_name' to mapping)
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • callAndReturnList

      public void callAndReturnList(int cursorStart, int maxRows, String sql, List<Object> params, CacheArray rows) throws SQLException
      Execute stored proc(and return result)
      Parameters:
      cursorStart - - JDBC result Cursor start index
      maxRows - - JDBC result max rows (JDBC limited rows 50,000,000)
      sql - - Query sql (use '?' to mapping)
      params - - Use List param mode
      rows - - CacheArray object
      Throws:
      SQLException - - if query failed
    • getReadTimer

      private long getReadTimer()