Skip to content

Commit 1969f60

Browse files
authored
init (#1667)
1 parent 72d2d86 commit 1969f60

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/lexer.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,12 @@ SELECT $text;
176176

177177
### Typed string literals {#typed-string-literals}
178178

179-
* For string literals, including [multi-string](#multiline-string-literals) ones, the `String` type is used by default.
179+
* For string literals, including [multi-string](#multiline-string-literals) ones, the `String` type is used by default (see also [PRAGMA UnicodeLiterals](../pragma.md#UnicodeLiterals)).
180180
* You can use the following suffixes to explicitly control the literal type:
181+
* `s``String`;
181182
* `u``Utf8`;
182-
* `y`: `Yson`.
183-
* `j`: `Json`.
183+
* `y``Yson`;
184+
* `j` `Json`.
184185

185186
**Example:**
186187
```yql

ydb/docs/en/core/yql/reference/yql-core/syntax/_includes/pragma/global.md

+22
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,28 @@ In the classical version, the result of integer division remains integer (by def
184184
If disabled, the result is always Double.
185185
ClassicDivision is a [scoped](#pragmascope) setting.
186186

187+
### UnicodeLiterals
188+
189+
`UnicodeLiterals`/`DisableUnicodeLiterals`
190+
191+
| Value type | Default |
192+
| --- | --- |
193+
| Flag | false |
194+
195+
When this mode is enabled, string literals without suffixes like "foo"/'bar'/@@multiline@@ will be of type `Utf8`, when disabled - `String`.
196+
UnicodeLiterals is a [scoped](#pragmascope) setting.
197+
198+
### WarnUntypedStringLiterals
199+
200+
`WarnUntypedStringLiterals`/`DisableWarnUntypedStringLiterals`
201+
202+
| Value type | Default |
203+
| --- | --- |
204+
| Flag | false |
205+
206+
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.
207+
WarnUntypedStringLiterals is a [scoped](#pragmascope) setting.
208+
187209
### AllowDotInAlias
188210

189211
| Value type | Default |

ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/lexer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ SELECT $text;
171171

172172
* Для строкового литерала, включая [многострочный](#multiline-string-literals), по умолчанию используется тип `String` (см. также [PRAGMA UnicodeLiterals](../pragma.md#UnicodeLiterals)).
173173
* С помощью следующих суффиксов можно явно управлять типом литерала:
174-
* `s` или `b` - `String`;
175-
* `u` или `t` `Utf8`;
174+
* `s` `String`;
175+
* `u``Utf8`;
176176
* `y``Yson`;
177177
* `j``Json`.
178178

ydb/docs/ru/core/yql/reference/yql-core/syntax/_includes/pragma/global.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ UnicodeLiterals является [scoped](#pragmascope) настройкой.
226226
| --- | --- |
227227
| Флаг | false |
228228

229-
При включенном режиме для строковых литералов без суффиксов вида "foo"/'bar'/@@multiline@@ будет генерироваться предупреждение. Его можно подавить, если явно выбрать суффикс `s` или `b` для типа `String`, либо `u` или `t` для типа `Utf8`.
229+
При включенном режиме для строковых литералов без суффиксов вида "foo"/'bar'/@@multiline@@ будет генерироваться предупреждение. Его можно подавить, если явно выбрать суффикс `s` для типа `String`, либо `u` для типа `Utf8`.
230230
WarnUntypedStringLiterals является [scoped](#pragmascope) настройкой.
231231

232232
### AllowDotInAlias

0 commit comments

Comments
 (0)