Skip to content

Commit 89a53cc

Browse files
committed
#148: Remove --!syntax_v1 directive everywhere
YQLv1 **is** available for all YOJ users (but some need to set the corresponding feature flag in their database).
1 parent 7cdcce4 commit 89a53cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/YdbRepositoryTransaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ private TxControl<?> getTxControl() {
273273
private String getYql(Statement<?, ?> statement) {
274274
// TODO(nvamelichev): Make the use of syntax_v1 directive configurable in YdbRepository.Settings
275275
// @see https://github.com/ydb-platform/yoj-project/issues/148
276-
return "--!syntax_v1\n" + statement.getQuery(tablespace);
276+
return statement.getQuery(tablespace);
277277
}
278278

279279
private static <PARAMS> Params getSdkParams(Statement<PARAMS, ?> statement, PARAMS params) {

repository-ydb-v2/src/main/java/tech/ydb/yoj/repository/ydb/compatibility/YdbSchemaCompatibilityChecker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void run() {
109109
if (!canExecuteMessages.isEmpty()) {
110110
var ddl = config.useBuilderDDLSyntax
111111
? String.join(",\n", canExecuteMessages)
112-
: "--!syntax_v1\n" + String.join("\n", canExecuteMessages);
112+
: String.join("\n", canExecuteMessages);
113113

114114
BiConsumer<String, String> logConsumer = config.warnOnMinorDifferences ? log::warn : log::info;
115115
logConsumer.accept("DB schema and code schema have minor differences.\n"
@@ -122,7 +122,7 @@ public void run() {
122122
if (!shouldExecuteMessages.isEmpty()) {
123123
var ddl = config.useBuilderDDLSyntax
124124
? String.join(",\n", shouldExecuteMessages)
125-
: "--!syntax_v1\n" + String.join("\n", shouldExecuteMessages);
125+
: String.join("\n", shouldExecuteMessages);
126126
log.error("DB schema and code schema have major differences.\n"
127127
+ "You must execute below commands before deploying the code:\n"
128128
+ "{}",

0 commit comments

Comments
 (0)