Reenable quoting for SqlServerDialect.

Quoting is important since it allows use of keywords as names.
We do not change the letter casing.
In a default setup the database does not care since it is case-insensitive.
If configured to be case-sensitive it makes sense to pass on what ever letter casing there is, since you seem to care.

Closes #1216
See #914
This commit is contained in:
Jens Schauder
2022-08-31 15:38:28 +02:00
parent 9ec6a524a8
commit 37b144fb9d
2 changed files with 5 additions and 2 deletions

View File

@@ -262,7 +262,7 @@ class SqlGeneratorUnitTests {
String sql = sqlGenerator.getFindAll(Sort.by(new Sort.Order(Sort.Direction.ASC, "name", Sort.NullHandling.NULLS_LAST)));
assertThat(sql).endsWith("ORDER BY dummy_entity.x_name ASC");
assertThat(sql).endsWith("ORDER BY \"dummy_entity\".\"x_name\" ASC");
}
@Test // DATAJDBC-101

View File

@@ -44,6 +44,9 @@ public class SqlServerDialect extends AbstractDialect {
}
};
private static final IdentifierProcessing IDENTIFIER_PROCESSING = IdentifierProcessing
.create(IdentifierProcessing.Quoting.ANSI, IdentifierProcessing.LetterCasing.AS_IS);
protected SqlServerDialect() {}
@Override
@@ -162,7 +165,7 @@ public class SqlServerDialect extends AbstractDialect {
@Override
public IdentifierProcessing getIdentifierProcessing() {
return IdentifierProcessing.NONE;
return IDENTIFIER_PROCESSING;
}
@Override