Class Sqlify.Builder

  • Enclosing class:
    Sqlify

    public static class Sqlify.Builder
    extends Object
    • Method Detail

      • executeSelect

        public <E> E executeSelect​(Connection connection)
        Executes a select. Use 'parseResultWith' to specify a parser that will map the result to nice Java objects.
        Parameters:
        connection - The connection to use for this query.
        Returns:
        The result as specified via 'parseResultWith'
      • executeUpdate

        public int executeUpdate​(Connection connection)
        Executes an update (insert, delete statement)
        Parameters:
        connection - The connection to use for this query.
        Returns:
        The number of lines affected by this query.
      • executeUpdateAndReturnGeneratedKey

        public <E> E executeUpdateAndReturnGeneratedKey​(Connection connection)
        Executes an update (insert, delete statement) and returns the generated key. Define the mapping via a ResultParser. For instance if you expect one Long as result you can use parseResultWith(SingleResultParser.of(Long.class))
        Parameters:
        connection - The connection to use for this query.
        Returns:
        The generated key.