java.lang.Object
com.github.fabriciofx.cactoos.jdbc.query.Timeout
All Implemented Interfaces:
Query, org.cactoos.Text

public final class Timeout extends Object implements Query
Timeout query.
Since:
0.1
  • Constructor Details

    • Timeout

      public Timeout(Query query, int seconds)
      Ctor.
      Parameters:
      query - The SQL query
      seconds - The timeout time
  • Method Details

    • prepared

      public PreparedStatement prepared(Connection connection) throws Exception
      Description copied from interface: Query
      Create a PreparedStatement.
      Specified by:
      prepared in interface Query
      Parameters:
      connection - A connection to the DataSource
      Returns:
      A PreparedStatement
      Throws:
      Exception - If fails
    • params

      public Params params()
      Description copied from interface: Query
      Return the Query params.
      Specified by:
      params in interface Query
      Returns:
      The query parameters
    • named

      public String named()
      Description copied from interface: Query
      Return a named query string.
      Specified by:
      named in interface Query
      Returns:
      A named query string
    • asString

      public String asString() throws Exception
      Specified by:
      asString in interface org.cactoos.Text
      Throws:
      Exception