diff --git a/docs/sql-manual/sql-functions/string-functions/int-to-uuid.md b/docs/sql-manual/sql-functions/string-functions/int-to-uuid.md new file mode 100644 index 0000000000000..f768a068af4b1 --- /dev/null +++ b/docs/sql-manual/sql-functions/string-functions/int-to-uuid.md @@ -0,0 +1,47 @@ +--- +{ + "title": "INT_TO_UUID", + "language": "en" +} +--- + + + +## int_to_uuid + +### description + +`VARCHAR int_to_uuid(LARGEINT int128)` + +For input encoded LARGEINT, translates to the original uuid string. + +### example + +```sql +mysql> select int_to_uuid(95721955514869408091759290071393952876); ++-----------------------------------------------------+ +| int_to_uuid(95721955514869408091759290071393952876) | ++-----------------------------------------------------+ +| 6ce4766f-6783-4b30-b357-bba1c7600348 | ++-----------------------------------------------------+ +``` + +### keywords + INT_TO_UUID diff --git a/docs/sql-manual/sql-functions/string-functions/uuid-to-int.md b/docs/sql-manual/sql-functions/string-functions/uuid-to-int.md new file mode 100644 index 0000000000000..7bc66059b7e4b --- /dev/null +++ b/docs/sql-manual/sql-functions/string-functions/uuid-to-int.md @@ -0,0 +1,47 @@ +--- +{ + "title": "UUID_TO_INT", + "language": "en" +} +--- + + + +## uuid_to_int + +### description + +`LARGEINT uuid_to_int(VARCHAR uuid)` + +Returns an int128 representation of the input uuid string. + +### example + +```sql +mysql> select uuid_to_int("6ce4766f-6783-4b30-b357-bba1c7600348"); ++-----------------------------------------------------+ +| uuid_to_int('6ce4766f-6783-4b30-b357-bba1c7600348') | ++-----------------------------------------------------+ +| 95721955514869408091759290071393952876 | ++-----------------------------------------------------+ +``` + +### keywords + UUID_TO_INT diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/int-to-uuid.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/int-to-uuid.md new file mode 100644 index 0000000000000..b9a81e91e9f8b --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/int-to-uuid.md @@ -0,0 +1,47 @@ +--- +{ + "title": "INT_TO_UUID", + "language": "zh-CN" +} +--- + + + +## int_to_uuid + +### description + +`VARCHAR int_to_uuid(LARGEINT int128)` + +对于输入的已编码 LARGEINT,转译为原始的 uuid 字符串。 + +### example + +```sql +mysql> select int_to_uuid(95721955514869408091759290071393952876); ++-----------------------------------------------------+ +| int_to_uuid(95721955514869408091759290071393952876) | ++-----------------------------------------------------+ +| 6ce4766f-6783-4b30-b357-bba1c7600348 | ++-----------------------------------------------------+ +``` + +### keywords + INT_TO_UUID diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/uuid-to-int.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/uuid-to-int.md new file mode 100644 index 0000000000000..29cc75a53dd0d --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-functions/string-functions/uuid-to-int.md @@ -0,0 +1,47 @@ +--- +{ + "title": "UUID_TO_INT", + "language": "zh-CN" +} +--- + + + +## uuid_to_int + +### description + +`LARGEINT uuid_to_int(VARCHAR uuid)` + +对于输入的 uuid 字符串,返回一个 int128 表示。 + +### example + +```sql +mysql> select uuid_to_int("6ce4766f-6783-4b30-b357-bba1c7600348"); ++-----------------------------------------------------+ +| uuid_to_int('6ce4766f-6783-4b30-b357-bba1c7600348') | ++-----------------------------------------------------+ +| 95721955514869408091759290071393952876 | ++-----------------------------------------------------+ +``` + +### keywords + UUID_TO_INT