@Test void testInteger() { QueryBuilder queryBuilder = getQueryBuilder(); assertThat(queryBuilder.getEscapedValue(fixtureColumns.get(0), fixtureRow)).isEqualTo("42"); }
protected String getEscapedValue(FixtureColumn fixtureColumn, FixtureRow fixtureRow) { String value = fixtureRow.getValues().get(fixtureColumn.getName()); if (value == null || "NULL".equals(value)) { return "NULL"; } if (!numericSqlTypes.contains(fixtureColumn.getType())) { return "'" + value.replaceAll("'", "''") + "'"; } return value; }
QueryBuilder { protected String getEscapedValue(FixtureColumn fixtureColumn, FixtureRow fixtureRow) { String value = fixtureRow.getValues().get(fixtureColumn.getName()); if (value == null || "NULL".equals(value)) { return "NULL"; } if (!numericSqlTypes.contains(fixtureColumn.getType())) { return "'" + value.replaceAll("'", "''") + "'"; } return value; } }
QueryBuilder { protected String getEscapedValue(FixtureColumn fixtureColumn, FixtureRow fixtureRow) { String value = fixtureRow.getValues().get(fixtureColumn.getName()); if (value == null || "NULL".equals(value)) { return "NULL"; } if (!numericSqlTypes.contains(fixtureColumn.getType())) { return "'" + value.replaceAll("'", "''") + "'"; } return value; }  }
QueryBuilder { protected String getEscapedValue(FixtureColumn fixtureColumn, FixtureRow fixtureRow) { String value = fixtureRow.getValues().get(fixtureColumn.getName()); if (value == null || "NULL".equals(value)) { return "NULL"; } if (!numericSqlTypes.contains(fixtureColumn.getType())) { return "'" + value.replaceAll("'", "''") + "'"; } return value; }  abstract List<String> buildQueries(Path path); }
QueryBuilder { protected String getEscapedValue(FixtureColumn fixtureColumn, FixtureRow fixtureRow) { String value = fixtureRow.getValues().get(fixtureColumn.getName()); if (value == null || "NULL".equals(value)) { return "NULL"; } if (!numericSqlTypes.contains(fixtureColumn.getType())) { return "'" + value.replaceAll("'", "''") + "'"; } return value; }  abstract List<String> buildQueries(Path path);  }