mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Add missing function protocol
This commit is contained in:
parent
81b2cad083
commit
818867d1fc
@ -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 `#`.
|
||||
|
@ -2257,6 +2257,7 @@ proleptic
|
||||
prometheus
|
||||
proportionsZTest
|
||||
proto
|
||||
protocol
|
||||
protobuf
|
||||
protobufsingle
|
||||
proxied
|
||||
|
Loading…
Reference in New Issue
Block a user