This is an automated email from the ASF dual-hosted git repository. lihaopeng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push: new 0a528a83aa [doc](function) add some doc for function ipv4-to-ipv6/cut-ipv6 (#840) 0a528a83aa is described below commit 0a528a83aa9c84d622fab2c08ecc3d257afcf82c Author: zhangstar333 <87313068+zhangstar...@users.noreply.github.com> AuthorDate: Wed Jul 10 20:32:34 2024 +0800 [doc](function) add some doc for function ipv4-to-ipv6/cut-ipv6 (#840) https://github.com/apache/doris/pull/36883 --- .../sql-functions/ip-functions/cut-ipv6.md | 51 +++++++++++++++++++++ .../sql-functions/ip-functions/ipv4-to-ipv6.md | 51 +++++++++++++++++++++ .../sql-functions/ip-functions/cut-ipv6.md | 53 ++++++++++++++++++++++ .../sql-functions/ip-functions/ipv4-to-ipv6.md | 53 ++++++++++++++++++++++ sidebars.json | 2 + 5 files changed, 210 insertions(+) diff --git a/docs/sql-manual/sql-functions/ip-functions/cut-ipv6.md b/docs/sql-manual/sql-functions/ip-functions/cut-ipv6.md new file mode 100644 index 0000000000..f0012c3b3d --- /dev/null +++ b/docs/sql-manual/sql-functions/ip-functions/cut-ipv6.md @@ -0,0 +1,51 @@ +--- +{ +"title": "CUT_IPV6", +"language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## CUT_IPV6 + +CUT_IPV6 + +### Description + +#### Syntax + +`STRING CUT_IPV6(IPV4 ipv4, TinyInt cut_ipv6_bytes, TinyInt cut_ipv4_bytes)` + +accept an IPv6 type address and return a string containing the address of the specified number of bytes removed in text format + +### Example + +```sql +mysql [(none)]>select cut_ipv6(to_ipv6('2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D'), 10, 0); ++-------------------+ +| '2001:db8:ac10::' | ++-------------------+ +| 2001:db8:ac10:: | ++-------------------+ +1 row in set (0.00 sec) +``` + +### Keywords + +CUT_IPV6, IP diff --git a/docs/sql-manual/sql-functions/ip-functions/ipv4-to-ipv6.md b/docs/sql-manual/sql-functions/ip-functions/ipv4-to-ipv6.md new file mode 100644 index 0000000000..ba3a0c0092 --- /dev/null +++ b/docs/sql-manual/sql-functions/ip-functions/ipv4-to-ipv6.md @@ -0,0 +1,51 @@ +--- +{ +"title": "IPV4_TO_IPV6", +"language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## IPV4_TO_IPV6 + +IPV4_TO_IPV6 + +### Description + +#### Syntax + +`IPV6 IPV4_TO_IPV6(IPV4 ipv4)` + +accept an IPv4 type address and return the converted IPv6 type address. + +### Example + +```sql +mysql [(none)]>select ipv6_num_to_string(ipv4_to_ipv6(to_ipv4('192.168.0.1'))); ++----------------------+ +| '::ffff:192.168.0.1' | ++----------------------+ +| ::ffff:192.168.0.1 | ++----------------------+ +1 row in set (0.02 sec) +``` + +### Keywords + +IPV4_TO_IPV6, IP diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/ip-functions/cut-ipv6.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/ip-functions/cut-ipv6.md new file mode 100644 index 0000000000..df46575054 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/ip-functions/cut-ipv6.md @@ -0,0 +1,53 @@ +--- +{ +"title": "CUT_IPV6", +"language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## CUT_IPV6 + +CUT_IPV6 + +### Description + +#### Syntax + +`STRING CUT_IPV6(IPV4 ipv4, TinyInt cut_ipv6_bytes, TinyInt cut_ipv4_bytes)` + + +接受一个 IPv6 类型的地址,并以文本格式返回一个包含指定字节数的地址的字符串。 + + +### Example + +```sql +mysql [(none)]>select cut_ipv6(to_ipv6('2001:0DB8:AC10:FE01:FEED:BABE:CAFE:F00D'), 10, 0); ++-------------------+ +| '2001:db8:ac10::' | ++-------------------+ +| 2001:db8:ac10:: | ++-------------------+ +1 row in set (0.00 sec) +``` + +### Keywords + +CUT_IPV6, IP diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/ip-functions/ipv4-to-ipv6.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/ip-functions/ipv4-to-ipv6.md new file mode 100644 index 0000000000..753afce931 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/ip-functions/ipv4-to-ipv6.md @@ -0,0 +1,53 @@ +--- +{ +"title": "IPV4_TO_IPV6", +"language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +## IPV4_TO_IPV6 + +IPV4_TO_IPV6 + +### Description + +#### Syntax + +`IPV6 IPV4_TO_IPV6(IPV4 ipv4)` + + +接受一个类型为 IPv4 的地址,返回相应 IPv6 的形式。 + + +### Example + +```sql +mysql [(none)]>select ipv6_num_to_string(ipv4_to_ipv6(to_ipv4('192.168.0.1'))); ++----------------------+ +| '::ffff:192.168.0.1' | ++----------------------+ +| ::ffff:192.168.0.1 | ++----------------------+ +1 row in set (0.02 sec) +``` + +### Keywords + +IPV4_TO_IPV6, IP diff --git a/sidebars.json b/sidebars.json index a937fb1960..50600d581e 100644 --- a/sidebars.json +++ b/sidebars.json @@ -1117,6 +1117,7 @@ "label": "IP Functions", "items": [ "sql-manual/sql-functions/ip-functions/ipv4-num-to-string", + "sql-manual/sql-functions/ip-functions/ipv4-to-ipv6", "sql-manual/sql-functions/ip-functions/ipv4-string-to-num", "sql-manual/sql-functions/ip-functions/ipv4-string-to-num-or-default", "sql-manual/sql-functions/ip-functions/ipv4-string-to-num-or-null", @@ -1129,6 +1130,7 @@ "sql-manual/sql-functions/ip-functions/ipv4-cidr-to-range", "sql-manual/sql-functions/ip-functions/ipv6-cidr-to-range", "sql-manual/sql-functions/ip-functions/is-ip-address-in-range", + "sql-manual/sql-functions/ip-functions/cut-ipv6", "sql-manual/sql-functions/ip-functions/is-ipv4-string", "sql-manual/sql-functions/ip-functions/is-ipv6-string", "sql-manual/sql-functions/ip-functions/to-ipv4", --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org