@Test public void testBaseFindAllParametrized() { List<Map> records = Base.findAll("select * from people where last_name = ? and name = ?", "Smith", "John"); a(records.size()).shouldBeEqual(1); }
public static List<Map> findAll(String query, Object... params) { return new DB(DB.DEFAULT_NAME).findAll(query, params); }
Base { public static List<Map> findAll(String query, Object... params) { return new DB(DB.DEFAULT_NAME).findAll(query, params); } }
Base { public static List<Map> findAll(String query, Object... params) { return new DB(DB.DEFAULT_NAME).findAll(query, params); } private  Base(); }
Base { public static List<Map> findAll(String query, Object... params) { return new DB(DB.DEFAULT_NAME).findAll(query, params); } private  Base(); static DB open(); static DB open(String driver, String url, String user, String password); static DB open(String driver, String url, Properties props); static DB open(String jndiName); static DB open(String jndiName, Properties jndiProperties); static DB open(DataSource dataSource); static Connection connection(); static boolean hasConnection(); static void close(boolean suppressWarning); static void close(); static Long count(String table); static Long count(String table, String query, Object... params); static Object firstCell(String query, Object... params); static List<Map> findAll(String query, Object... params); static List firstColumn(String query, Object... params); static List<Map> findAll(String query); static RowProcessor find(String query, Object ... params); static RowProcessor find(RowProcessor.ResultSetType type, RowProcessor.ResultSetConcur concur, int fetchSize, String query, Object ... params); static void find(String sql, RowListener listener); static int exec(String query); static int exec(String query, Object ... params); static void openTransaction(); static void commitTransaction(); static void rollbackTransaction(); static PreparedStatement startBatch(String parametrizedStatement); static void addBatch(PreparedStatement ps, Object... parameters); static int[] executeBatch(PreparedStatement ps); static void closePreparedStatement(PreparedStatement ps); static void attach(Connection connection); static Connection detach(); static T withDb(String jndiName, Properties jndiProperties, Supplier<T> supplier); static T withDb(DataSource dataSource, Supplier<T> supplier); static T withDb(String jndiName, Supplier<T> supplier); static T withDb(String driver, String url, Properties properties, Supplier<T> supplier); static T withDb(String driver, String url, String user, String password, Supplier<T> supplier); static T withDb(Supplier<T> supplier); }
Base { public static List<Map> findAll(String query, Object... params) { return new DB(DB.DEFAULT_NAME).findAll(query, params); } private  Base(); static DB open(); static DB open(String driver, String url, String user, String password); static DB open(String driver, String url, Properties props); static DB open(String jndiName); static DB open(String jndiName, Properties jndiProperties); static DB open(DataSource dataSource); static Connection connection(); static boolean hasConnection(); static void close(boolean suppressWarning); static void close(); static Long count(String table); static Long count(String table, String query, Object... params); static Object firstCell(String query, Object... params); static List<Map> findAll(String query, Object... params); static List firstColumn(String query, Object... params); static List<Map> findAll(String query); static RowProcessor find(String query, Object ... params); static RowProcessor find(RowProcessor.ResultSetType type, RowProcessor.ResultSetConcur concur, int fetchSize, String query, Object ... params); static void find(String sql, RowListener listener); static int exec(String query); static int exec(String query, Object ... params); static void openTransaction(); static void commitTransaction(); static void rollbackTransaction(); static PreparedStatement startBatch(String parametrizedStatement); static void addBatch(PreparedStatement ps, Object... parameters); static int[] executeBatch(PreparedStatement ps); static void closePreparedStatement(PreparedStatement ps); static void attach(Connection connection); static Connection detach(); static T withDb(String jndiName, Properties jndiProperties, Supplier<T> supplier); static T withDb(DataSource dataSource, Supplier<T> supplier); static T withDb(String jndiName, Supplier<T> supplier); static T withDb(String driver, String url, Properties properties, Supplier<T> supplier); static T withDb(String driver, String url, String user, String password, Supplier<T> supplier); static T withDb(Supplier<T> supplier);  }