Skip to content

Commit

Permalink
init (#1667)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitstn authored Feb 7, 2024
1 parent 72d2d86 commit 1969f60
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1969f60

Please sign in to comment.