@Test public void testSelectStarParametrized() { a(dialect.selectStarParametrized("people", "name")).shouldBeEqual("SELECT * FROM people WHERE name = ?"); a(dialect.selectStarParametrized("people", "name", "last_name")).shouldBeEqual( "SELECT * FROM people WHERE name = ? AND last_name = ?"); }
@Override public String selectStarParametrized(String table, String ... parameters) { StringBuilder sql = new StringBuilder().append("SELECT * FROM ").append(table).append(" WHERE "); join(sql, parameters, " = ? AND "); sql.append(" = ?"); return sql.toString(); }
DefaultDialect implements Dialect { @Override public String selectStarParametrized(String table, String ... parameters) { StringBuilder sql = new StringBuilder().append("SELECT * FROM ").append(table).append(" WHERE "); join(sql, parameters, " = ? AND "); sql.append(" = ?"); return sql.toString(); } }
DefaultDialect implements Dialect { @Override public String selectStarParametrized(String table, String ... parameters) { StringBuilder sql = new StringBuilder().append("SELECT * FROM ").append(table).append(" WHERE "); join(sql, parameters, " = ? AND "); sql.append(" = ?"); return sql.toString(); }  }
DefaultDialect implements Dialect { @Override public String selectStarParametrized(String table, String ... parameters) { StringBuilder sql = new StringBuilder().append("SELECT * FROM ").append(table).append(" WHERE "); join(sql, parameters, " = ? AND "); sql.append(" = ?"); return sql.toString(); }  @Override String selectStar(String table); @Override String selectStar(String table, String where); @Override String selectStarParametrized(String table, String ... parameters); @Override String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset); @Override Object overrideDriverTypeConversion(MetaModel mm, String attributeName, Object value); @Override String selectCount(String from); @Override String selectCount(String table, String where); @Override String selectExists(MetaModel metaModel); @Override String selectManyToManyAssociation(Many2ManyAssociation association, String sourceFkColumnName, int questionsCount); @Override String insertManyToManyAssociation(Many2ManyAssociation association); @Override String insertParametrized(MetaModel metaModel, List<String> columns, boolean containsId); @Override String deleteManyToManyAssociation(Many2ManyAssociation association); @Override String insert(MetaModel metaModel, Map<String, Object> attributes, String ... replacements); @Override String update(MetaModel metaModel, Map<String, Object> attributes, String ... replacements); }
DefaultDialect implements Dialect { @Override public String selectStarParametrized(String table, String ... parameters) { StringBuilder sql = new StringBuilder().append("SELECT * FROM ").append(table).append(" WHERE "); join(sql, parameters, " = ? AND "); sql.append(" = ?"); return sql.toString(); }  @Override String selectStar(String table); @Override String selectStar(String table, String where); @Override String selectStarParametrized(String table, String ... parameters); @Override String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset); @Override Object overrideDriverTypeConversion(MetaModel mm, String attributeName, Object value); @Override String selectCount(String from); @Override String selectCount(String table, String where); @Override String selectExists(MetaModel metaModel); @Override String selectManyToManyAssociation(Many2ManyAssociation association, String sourceFkColumnName, int questionsCount); @Override String insertManyToManyAssociation(Many2ManyAssociation association); @Override String insertParametrized(MetaModel metaModel, List<String> columns, boolean containsId); @Override String deleteManyToManyAssociation(Many2ManyAssociation association); @Override String insert(MetaModel metaModel, Map<String, Object> attributes, String ... replacements); @Override String update(MetaModel metaModel, Map<String, Object> attributes, String ... replacements);  }