From f1eee40345923b75371a2a8d9583af2de69de9ad Mon Sep 17 00:00:00 2001 From: ni1l <94829417+ni1l@users.noreply.github.com> Date: Tue, 10 May 2022 00:03:10 +0800 Subject: [PATCH] Add isIPAddressInRange function example --- .../functions/ip-address-functions.md | 14 ++++++++++++++ .../functions/ip-address-functions.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/docs/en/sql-reference/functions/ip-address-functions.md b/docs/en/sql-reference/functions/ip-address-functions.md index fa52d32729f..a37398786af 100644 --- a/docs/en/sql-reference/functions/ip-address-functions.md +++ b/docs/en/sql-reference/functions/ip-address-functions.md @@ -478,3 +478,17 @@ Result: │ 0 │ └──────────────────────────────────────────────┘ ``` + +Query: + +``` sql +SELECT isIPAddressInRange('::ffff:192.168.0.1', '::ffff:192.168.0.4/128'); +``` + +Result: + +``` text +┌─isIPAddressInRange('::ffff:192.168.0.1', '::ffff:192.168.0.4/128')─┐ +│ 0 │ +└────────────────────────────────────────────────────────────────────┘ +``` diff --git a/docs/ru/sql-reference/functions/ip-address-functions.md b/docs/ru/sql-reference/functions/ip-address-functions.md index f18ea08b633..428fd3dff31 100644 --- a/docs/ru/sql-reference/functions/ip-address-functions.md +++ b/docs/ru/sql-reference/functions/ip-address-functions.md @@ -446,3 +446,17 @@ SELECT isIPAddressInRange('127.0.0.1', 'ffff::/16'); │ 0 │ └──────────────────────────────────────────────┘ ``` + +Запрос: + +``` sql +SELECT isIPAddressInRange('::ffff:192.168.0.1', '::ffff:192.168.0.4/128'); +``` + +Результат: + +``` text +┌─isIPAddressInRange('::ffff:192.168.0.1', '::ffff:192.168.0.4/128')─┐ +│ 0 │ +└────────────────────────────────────────────────────────────────────┘ +```