From ec11d35e4b8a98e78e5e5bb6fefdf061fc669637 Mon Sep 17 00:00:00 2001 From: Kirill Kurdyukov Date: Wed, 4 Sep 2024 10:04:50 +0300 Subject: [PATCH] feat: quote view index (#153) --- .../src/main/java/tech/ydb/data/core/dialect/YdbDialect.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-data-jdbc-ydb/src/main/java/tech/ydb/data/core/dialect/YdbDialect.java b/spring-data-jdbc-ydb/src/main/java/tech/ydb/data/core/dialect/YdbDialect.java index 3dd1738..f82b25c 100644 --- a/spring-data-jdbc-ydb/src/main/java/tech/ydb/data/core/dialect/YdbDialect.java +++ b/spring-data-jdbc-ydb/src/main/java/tech/ydb/data/core/dialect/YdbDialect.java @@ -65,8 +65,8 @@ protected Function getAfterFromTable() { if (viewIndex != null && (viewIndex.tableName().isEmpty() || viewIndex.tableName().equals(tables.get(0).getName().toSql(IdentifierProcessing.NONE)))) { - return " VIEW " + viewIndex.indexName() + " AS " + tables.get(0).getReferenceName() - .toSql(INSTANCE.getIdentifierProcessing()); + return " VIEW " + getIdentifierProcessing().quote(viewIndex.indexName()) + + " AS " + tables.get(0).getReferenceName().toSql(INSTANCE.getIdentifierProcessing()); } return "";