Merge pull request #65685 from Blargian/docs_protocol

[Docs] add missing function `protocol` to docs
This commit is contained in:
Alexey Milovidov 2024-06-26 15:00:59 +00:00 committed by GitHub
commit c8a2490be7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 35 additions and 0 deletions

View File

@ -818,6 +818,40 @@ The same as above, but including query string and fragment.
Example: `/top/news.html?page=2#comments`.
### protocol
Extracts the protocol from a URL.
**Syntax**
```sql
protocol(url)
```
**Arguments**
- `url` — URL to extract protocol from. [String](../data-types/string.md).
**Returned value**
- Protocol, or an empty string if it cannot be determined. [String](../data-types/string.md).
**Example**
Query:
```sql
SELECT protocol('https://clickhouse.com/');
```
Result:
```response
┌─protocol('https://clickhouse.com/')─┐
│ https │
└─────────────────────────────────────┘
```
### queryString
Returns the query string without the initial question mark, `#` and everything after `#`.

View File

@ -2262,6 +2262,7 @@ proleptic
prometheus
proportionsZTest
proto
protocol
protobuf
protobufsingle
proxied