From 1969f60e1fcb00c101a301586f4cf7c7a25f3568 Mon Sep 17 00:00:00 2001 From: Vitaly Stoyan Date: Wed, 7 Feb 2024 19:30:16 +0300 Subject: [PATCH] init (#1667) --- .../yql-core/syntax/_includes/lexer.md | 7 +++--- .../syntax/_includes/pragma/global.md | 22 +++++++++++++++++++ .../yql-core/syntax/_includes/lexer.md | 4 ++-- .../syntax/_includes/pragma/global.md | 2 +- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/lexer.md b/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/lexer.md index 614c0b16bbf1..1a69e42fd6ce 100644 --- a/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/lexer.md +++ b/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/lexer.md @@ -176,11 +176,12 @@ SELECT $text; ### Typed string literals {#typed-string-literals} -* For string literals, including [multi-string](#multiline-string-literals) ones, the `String` type is used by default. +* For string literals, including [multi-string](#multiline-string-literals) ones, the `String` type is used by default (see also [PRAGMA UnicodeLiterals](../pragma.md#UnicodeLiterals)). * You can use the following suffixes to explicitly control the literal type: + * `s` — `String`; * `u` — `Utf8`; - * `y`: `Yson`. - * `j`: `Json`. + * `y` — `Yson`; + * `j` — `Json`. **Example:** ```yql diff --git a/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/pragma/global.md b/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/pragma/global.md index 758e47550813..e8a71c4b54b2 100644 --- a/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/pragma/global.md +++ b/ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/pragma/global.md @@ -184,6 +184,28 @@ In the classical version, the result of integer division remains integer (by def If disabled, the result is always Double. ClassicDivision is a [scoped](#pragmascope) setting. +### UnicodeLiterals + +`UnicodeLiterals`/`DisableUnicodeLiterals` + +| Value type | Default | +| --- | --- | +| Flag | false | + +When this mode is enabled, string literals without suffixes like "foo"/'bar'/@@multiline@@ will be of type `Utf8`, when disabled - `String`. +UnicodeLiterals is a [scoped](#pragmascope) setting. + +### WarnUntypedStringLiterals + +`WarnUntypedStringLiterals`/`DisableWarnUntypedStringLiterals` + +| Value type | Default | +| --- | --- | +| Flag | false | + +When this mode is enabled, a warning will be generated for string literals without suffixes like "foo"/'bar'/@@multiline@@. It can be suppressed by explicitly choosing the suffix `s` for the `String` type, or `u` for the `Utf8` type. +WarnUntypedStringLiterals is a [scoped](#pragmascope) setting. + ### AllowDotInAlias | Value type | Default | diff --git a/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/lexer.md b/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/lexer.md index bcc3038047e5..aded5aaec838 100644 --- a/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/lexer.md +++ b/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/lexer.md @@ -171,8 +171,8 @@ SELECT $text; * Для строкового литерала, включая [многострочный](#multiline-string-literals), по умолчанию используется тип `String` (см. также [PRAGMA UnicodeLiterals](../pragma.md#UnicodeLiterals)). * С помощью следующих суффиксов можно явно управлять типом литерала: - * `s` или `b` - `String`; - * `u` или `t` — `Utf8`; + * `s` — `String`; + * `u` — `Utf8`; * `y` — `Yson`; * `j` — `Json`. diff --git a/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/pragma/global.md b/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/pragma/global.md index 013355ae1a7d..c5d234337132 100644 --- a/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/pragma/global.md +++ b/ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/pragma/global.md @@ -226,7 +226,7 @@ UnicodeLiterals является [scoped](#pragmascope) настройкой. | --- | --- | | Флаг | false | -При включенном режиме для строковых литералов без суффиксов вида "foo"/'bar'/@@multiline@@ будет генерироваться предупреждение. Его можно подавить, если явно выбрать суффикс `s` или `b` для типа `String`, либо `u` или `t` для типа `Utf8`. +При включенном режиме для строковых литералов без суффиксов вида "foo"/'bar'/@@multiline@@ будет генерироваться предупреждение. Его можно подавить, если явно выбрать суффикс `s` для типа `String`, либо `u` для типа `Utf8`. WarnUntypedStringLiterals является [scoped](#pragmascope) настройкой. ### AllowDotInAlias