kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 812065ca1fc0eac334e34dc9fb479d3e798da074117b4b81df1607f03b1110d6 |
|---|---|
| Author | Alexandre Dutra <alexandre.dutra@datastax.com> · 2016-03-01 10:38 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2016-03-03 11:49 +01:00 |
| Parents | 291b71942c66 |
2 files changed
modified driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java +1 −0
| @@ -227,6 +227,7 @@ | ||
| 227 | 227 | * |
| 228 | 228 | * @param columnName the column name to quote. |
| 229 | 229 | * @return the quoted column name. |
| 230 | + * @see Metadata#quote(String) | |
| 230 | 231 | */ |
| 231 | 232 | public static String quote(String columnName) { |
| 232 | 233 | return Metadata.quote(columnName); |
modified driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java +1 −1
| @@ -865,7 +865,7 @@ | ||
| 865 | 865 | public void should_quote_column_names_with_escaped_quotes() { |
| 866 | 866 | // A column name can include quotes as long as it is escaped with another set of quotes, so "foo""bar" is a valid name. |
| 867 | 867 | String query = "SELECT * FROM foo WHERE \"foo \"\" bar\"=1;"; |
| 868 | - Statement statement = select().from("foo").where(eq(quote("foo \"\" bar"), 1)); | |
| 868 | + Statement statement = select().from("foo").where(eq(quote("foo \" bar"), 1)); | |
| 869 | 869 | |
| 870 | 870 | assertThat(statement.toString()).isEqualTo(query); |
| 871 | 871 | } |