{"id":19005836,"url":"https://github.com/pluots/udf-suite","last_synced_at":"2026-03-16T08:34:07.518Z","repository":{"id":64993710,"uuid":"557993778","full_name":"pluots/udf-suite","owner":"pluots","description":"A collection of UDFs for MariaDB \u0026 MySQL, written using the rust `udf` library. Includes uuid generation functions.","archived":false,"fork":false,"pushed_at":"2024-02-11T04:07:11.000Z","size":195,"stargazers_count":16,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T10:27:35.355Z","etag":null,"topics":["lipsum","mariadb","mysql","rust","udf","user-defined-functions","uuid"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pluots.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.Apache-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-26T17:36:31.000Z","updated_at":"2025-03-26T13:45:46.000Z","dependencies_parsed_at":"2023-01-13T15:08:30.718Z","dependency_job_id":"73431c0c-ba96-426b-9a9f-ed15c12b6448","html_url":"https://github.com/pluots/udf-suite","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluots%2Fudf-suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluots%2Fudf-suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluots%2Fudf-suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluots%2Fudf-suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pluots","download_url":"https://codeload.github.com/pluots/udf-suite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306611,"owners_count":21408925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lipsum","mariadb","mysql","rust","udf","user-defined-functions","uuid"],"created_at":"2024-11-08T18:29:21.152Z","updated_at":"2026-03-16T08:34:07.480Z","avatar_url":"https://github.com/pluots.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# udf-suite\n\nA collection of UDFs for MariaDB \u0026 MySQL, written using the rust [`udf`]\nlibrary. For instructions on how to use these libraries, jump to the\n[Installation](#installation) section.\n\nNew function contributions are welcome!\n\n[`udf`]: http://docs.rs/udf\n\n## Included UDFs\n\nThe following UDFs are includes:\n\n- [UUIDs](#uuid): generate and convert v1, v2, v6, and v7 UUIDs\n- [Hash Algorithms](#hash-algorithms): run a wide variety of hash algorithms,\n  including the following families: `blake`, `sha`, `keccak`, `sha3`, and\n  `xxhash`\n- [IP Functions](#ip-address-functions) for interop: `ip_validate`,\n  `ip_to_canonical`, `ip_to_ipv4_mapped`\n- [String Operations](#string-operations): Calculations such as Levenshtein\n  edit distance, including limited and normalized versions.\n- [Jsonify](#jsonify): convert any data to JSON\n- [Lipsum](#lipsum): generate random text\n\nSee the relevant section for more information.\n\n### UUID\n\nProvide UUID functions similar to the Postges [`uuid-osp`] package:\n\n- Generate v1 and v4 UUIDs (v3 \u0026 v5 coming soon)\n- Generate the new v6 and v7 UUIDs\n- Validate UUIDs\n- Create namespace UUIDs\n- `uuid_to_bin` and `uuid_from_bin`/`bin_to_uuid` functions, including bit\n  rearranging options\n\nSee the [UUID Readme](/udf-uuid/README.md) for more information\n\n#### Usage\n\n```text\nnote: type uuid is type string\nuuid_generate_v1() -\u003e uuid\nuuid_generate_v1mc() -\u003e uuid\nuuid_generate_v4() -\u003e uuid\nuuid_generate_v6([node_addr: string]) -\u003e uuid\nuuid_generate_v7() -\u003e uuid\nuuid_nil() -\u003e uuid\nuuid_max() -\u003e uuid\nuuid_ns_dns() -\u003e string\nuuid_ns_url() -\u003e string\nuuid_ns_oid() -\u003e string\nuuid_ns_x500() -\u003e string\nuuid_is_valid(uuid: uuid) -\u003e boolean\nuuid_to_bin(uuid: uuid) -\u003e bytes\nuuid_from_bin() -\u003e uuid\nbin_from_uuid() -\u003e uuid\n```\n\n#### Examples\n\n```text\nMariaDB [(none)]\u003e select uuid_generate_v6();\n+--------------------------------------+\n| uuid_generate_v6()                   |\n+--------------------------------------+\n| 1ede5b09-ea01-6208-bca8-8809c0dd8e70 |\n+--------------------------------------+\n1 row in set (0.000 sec)\n\nMariaDB [(none)]\u003e select hex(uuid_to_bin(uuid_generate_v4()));\n+--------------------------------------+\n| hex(uuid_to_bin(uuid_generate_v4())) |\n+--------------------------------------+\n| B1B3AB9D490A4D20BFBD026AB1C045FB     |\n+--------------------------------------+\n1 row in set (0.002 sec)\n```\n\n[`uuid-osp`]: https://www.postgresql.org/docs/current/uuid-ossp.html\n\n### Hash Algorithms\n\nThis library provides the following functions:\n\n  - `blake2b512`, `blake2s256`, `blake3`, `blake3_thd`. `blake3_thd` provides\n    a multithreaded hasher that can be much faster for large data; per the docs,\n    128 KiB is about the minimum size to see any signifcant improvement over\n    `blake3`.\n  - `sha224`, `sha256`, `sha384`, `sha512` (these are also built in)\n  - `keccak224`, `keccak256`\n  - `sha3_224`, `sha3_256`, `sha3_384`, `sha3_512`\n  - `xxhash3`, `xxhash32`, `xxhash64`, `xxhash` (`xxhash` is an alias for\n    `xxhash64`)\n\nAll of these return hex strings by default. `_bin` functions are also\nprovided that return the binary result without going through hexification,\nsuitable for storage in a `BINARY(X)` column.\n\n\n#### Usage\n\n```text\nblake2b512(a: any [, ...]) -\u003e string\nblake2b512_bin(a: any [, ...]) -\u003e bytes\nblake2s512(a: any [, ...]) -\u003e string\nblake2s512_bin(a: any [, ...]) -\u003e bytes\nblake3(a: any [, ...]) -\u003e string\nblake3_bin(a: any [, ...]) -\u003e bytes\nblake3_thd(a: any [, ...]) -\u003e string\nblake3_thd_bin(a: any [, ...]) -\u003e bytes\nmd5_u(a: any [, ...]) -\u003e string\nmd5_u_bin(a: any [, ...]) -\u003e bytes\nsha1_u(a: any [, ...]) -\u003e string\nsha1_u_bin(a: any [, ...]) -\u003e bytes\nsha224(a: any [, ...]) -\u003e string\nsha224_bin(a: any [, ...]) -\u003e bytes\nsha256(a: any [, ...]) -\u003e string\nsha256_bin(a: any [, ...]) -\u003e bytes\nsha384(a: any [, ...]) -\u003e string\nsha384_bin(a: any [, ...]) -\u003e bytes\nsha512(a: any [, ...]) -\u003e string\nsha512_bin(a: any [, ...]) -\u003e bytes\nkeccak224(a: any [, ...]) -\u003e string\nkeccak224_bin(a: any [, ...]) -\u003e bytes\nkeccak256(a: any [, ...]) -\u003e string\nkeccak256_bin(a: any [, ...]) -\u003e bytes\nsha3_224(a: any [, ...]) -\u003e string\nsha3_224_bin(a: any [, ...]) -\u003e bytes\nsha3_256(a: any [, ...]) -\u003e string\nsha3_256_bin(a: any [, ...]) -\u003e bytes\nsha3_384(a: any [, ...]) -\u003e string\nsha3_384_bin(a: any [, ...]) -\u003e bytes\nsha3_512(a: any [, ...]) -\u003e string\nsha3_512_bin(a: any [, ...]) -\u003e bytes\nxxhash(a: any [, ...]) -\u003e integer\nxxhash3(a: any [, ...]) -\u003e integer\nxxhash32(a: any [, ...]) -\u003e integer\nxxhash64(a: any [, ...]) -\u003e integer\n```\n\n#### Examples\n\n```text\nMariaDB [(none)]\u003e select blake3(\"Hello, world!\");\n+------------------------------------------------------------------+\n| blake3(\"Hello, world!\")                                          |\n+------------------------------------------------------------------+\n| EDE5C0B10F2EC4979C69B52F61E42FF5B413519CE09BE0F14D098DCFE5F6F98D |\n+------------------------------------------------------------------+\n1 row in set (0.000 sec)\n\nMariaDB [(none)]\u003e select sha3_256(\"Hello, world!\");\n+------------------------------------------------------------------+\n| sha3_256(\"Hello, world!\")                                        |\n+------------------------------------------------------------------+\n| F345A219DA005EBE9C1A1EAAD97BBF38A10C8473E41D0AF7FB617CAA0C6AA722 |\n+------------------------------------------------------------------+\n1 row in set (0.000 sec)\n\nMariaDB [(none)]\u003e select blake3_bin(\"Hello, world!\");\n+----------------------------------+\n| blake3_bin(\"Hello, world!\")      |\n+----------------------------------+\n| ����.ė�i�/a�/��Q����M        ������                      |\n+----------------------------------+\n1 row in set (0.000 sec)\n```\n\n\nFor all hash functions, multiple arguments are combined to produce a single hash output:\n\n```text\nMariaDB [(none)]\u003e select xxhash('Hello, ', 0x77, 'orld', '!');\n+--------------------------------------+\n| xxhash('Hello, ', 0x77, 'orld', '!') |\n+--------------------------------------+\n|                  -755700219241327498 |\n+--------------------------------------+\n1 row in set (0.000 sec)\n```\n\nNote that in SQL, all integers are an `i64`, all floats are a `f64`, and all\ndecimals are represented as a string to the UDF API. This library hashes these\ntypes as their little endian representation on all platforms. (You only need\nto worry about this if you have very obscure platform compatibility\nrequirements. Strings and blobs are always unambiguous).\n\n### String Operations\n\nProvide the function `levenshtein`, which calculates the levenshtein edit\ndistance between two strings. There is also `levenshtein_normalized` that\nreturns a value between 0.0 (identical) and 1.0 (significantly different).\n\nIf a limit is provided as a third argument, the operation will terminate if\nthat limit is exceeded. This can help to improve performance if filtering\ndissimilar strings.\n\nThese algorithms provide a _byte_ edit distance, rather than unicode chars or\ngraphemes. These options may be added in the future.\n\nThese algorithms are implemented by the [`rapidfuzz`] crate.\n\n[`rapidfuzz`]: https://crates.io/crates/rapidfuzz\n\n#### Usage\n\n```text\nlevenshtein(a: str, b: str [, limit: integer]) -\u003e integer;\nlevenshtein_normalized(a: str, b: str [, limit: real]) -\u003e real;\n```\n\n#### Example\n\n```text\nMariaDB [(none)]\u003e SELECT levenshtein('foo', 'moose'), levenshtein_normalized('foo', 'moos');\n+-----------------------------+---------------------------------------+\n| levenshtein('foo', 'moose') | levenshtein_normalized('foo', 'moos') |\n+-----------------------------+---------------------------------------+\n|                           3 |                                   0.5 |\n+-----------------------------+---------------------------------------+\n1 row in set (0.001 sec)\n\nMariaDB [(none)]\u003e SELECT levenshtein('foo', 'moose', 2), levenshtein_normalized('foo', 'moos', 0.3);\n+--------------------------------+--------------------------------------------+\n| levenshtein('foo', 'moose', 2) | levenshtein_normalized('foo', 'moos', 0.3) |\n+--------------------------------+--------------------------------------------+\n|                              2 |                                        0.3 |\n+--------------------------------+--------------------------------------------+\n1 row in set (0.001 sec)\n```\n\n### Jsonify\n\nProvide the function `jsonify`, which quickly creates JSON output for any given\ninputs.\n\n#### Usage\n\n```text\njsonify(a: any [, ...]) -\u003e string\n```\n\n#### Examples\n\n```text\nMariaDB [db]\u003e select jsonify(qty, cost, class) from t1 limit 4;\n+-------------------------------------+\n| jsonify(qty, cost, class)           |\n+-------------------------------------+\n| {\"class\":\"a\",\"cost\":50.0,\"qty\":10}  |\n| {\"class\":\"c\",\"cost\":5.6,\"qty\":8}    |\n| {\"class\":\"a\",\"cost\":20.7,\"qty\":5}   |\n| {\"class\":\"b\",\"cost\":12.78,\"qty\":10} |\n+-------------------------------------+\n4 rows in set (0.000 sec)\n```\n\nAliasing also works to change key names:\n\n```text\nMariaDB [db]\u003e select jsonify(uuid() as uuid, qty as quantity, cost) from t1 limit 4;\n+----------------------------------------------------------------------------+\n| jsonify(uuid() as uuid, qty as quantity, cost)                             |\n+----------------------------------------------------------------------------+\n| {\"cost\":50.0,\"quantity\":10,\"uuid\":\"45952863-5b4d-11ed-b214-0242ac110002\"}  |\n| {\"cost\":5.6,\"quantity\":8,\"uuid\":\"4595291b-5b4d-11ed-b214-0242ac110002\"}    |\n| {\"cost\":20.7,\"quantity\":5,\"uuid\":\"45952953-5b4d-11ed-b214-0242ac110002\"}   |\n| {\"cost\":12.78,\"quantity\":10,\"uuid\":\"4595297a-5b4d-11ed-b214-0242ac110002\"} |\n+----------------------------------------------------------------------------+\n4 rows in set (0.001 sec)\n```\n\n### Lipsum\n\nUses the [lipsum crate] to generate lipsum strings with a specified word count.\n\n#### Usage\n\n```text\nlipsum(count: integer [, seed: integer]) -\u003e string\n```\n\n#### Examples\n\n\n```text\nMariaDB [(none)]\u003e select lipsum(10);\n+------------------------------------------------------------------+\n| lipsum(10)                                                       |\n+------------------------------------------------------------------+\n| Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do. |\n+------------------------------------------------------------------+\n1 row in set (0.000 sec)\n```\n\n[lipsum crate]: https://docs.rs/lipsum/latest/lipsum/\n\n### IP Address Functions\n\nWe provide three IP functions:\n\n- `ip_validate` which will return either `ipv4` or `ipv6` if the format is\n  valid, `NULL` otherwise.\n- `ip_to_ipv6_mapped` which converts ipv4 addresses to their ipv6 form (e.g.\n  for interop with the `INET6` data type)\n- `ip_to_canonical` which reverses the mapping operation\n\n#### Usage\n\n```text\nip_validate(ip: string) -\u003e string\nip_to_canonical(ip: string) -\u003e string\nip_to_ipv6_mapped(ip: string) -\u003e string\n```\n\n#### Examples\n\n```text\nMariaDB [db]\u003e select\n    -\u003e     input,\n    -\u003e     ip_validate(input),\n    -\u003e     ip_to_ipv6_mapped(input),\n    -\u003e     ip_to_canonical(input)\n    -\u003e from t1;\n+--------------------------------------+--------------------+--------------------------------------+--------------------------------------+\n| input                                | ip_validate(input) | ip_to_ipv6_mapped(input)             | ip_to_canonical(input)               |\n+--------------------------------------+--------------------+--------------------------------------+--------------------------------------+\n| 203.0.113.0                          | ipv4               | ::ffff:203.0.113.0                   | 203.0.113.0                          |\n| 127.0.0.1                            | ipv4               | ::ffff:127.0.0.1                     | 127.0.0.1                            |\n| ::ffff:127.0.0.1                     | ipv6               | ::ffff:127.0.0.1                     | 127.0.0.1                            |\n| 2001:db8::1:0:0:1                    | ipv6               | 2001:db8::1:0:0:1                    | 2001:db8::1:0:0:1                    |\n| 2001:db8:85a3:8d3:1319:8a2e:370:7348 | ipv6               | 2001:db8:85a3:8d3:1319:8a2e:370:7348 | 2001:db8:85a3:8d3:1319:8a2e:370:7348 |\n| hello!                               | NULL               | NULL                                 | NULL                                 |\n| NULL                                 | NULL               | NULL                                 | NULL                                 |\n+--------------------------------------+--------------------+--------------------------------------+--------------------------------------+\n7 rows in set (0.000 sec)\n```\n\n## Installation\n\nCompiled library binaries can be downloaded from this library's [releases] page.\nThe desired files can be copied to the plugin directory (usually\n`/usr/lib/mysql/plugin`) and selectively loaded:\n\n```sql\n-- **** Hash functions ****\nCREATE OR REPLACE FUNCTION blake2b512 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION blake2s256 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION blake3 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION blake3_thd RETURNS string SONAME 'libudf_hash.so';\n-- the md5 and sha functions have builtin versions, hence the `_u` suffix\nCREATE OR REPLACE FUNCTION md5_u RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha1_u RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha224 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha256 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha384 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha512 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION keccak224 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION keccak256 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_224 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_256 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_384 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_512 RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION xxhash RETURNS integer SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION xxhash3 RETURNS integer SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION xxhash32 RETURNS integer SONAME 'libudf_hash.so';\n-- `xxhash` and `xxhash64` are aliases\nCREATE OR REPLACE FUNCTION xxhash64 RETURNS integer SONAME 'libudf_hash.so';\n\n-- binary-returning versions of hash algorithms, as a convenience alternative to\n-- `unhex(blake3(...))`\nCREATE OR REPLACE FUNCTION blake2b512_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION blake2s256_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION blake3_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION blake3_thd_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION md5_u_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha1_u_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha224_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha256_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha384_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha512_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION keccak224_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION keccak256_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_224_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_256_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_384_bin RETURNS string SONAME 'libudf_hash.so';\nCREATE OR REPLACE FUNCTION sha3_512_bin RETURNS string SONAME 'libudf_hash.so';\n\n-- **** JSON creation function ****\nCREATE OR REPLACE FUNCTION jsonify RETURNS string SONAME 'libudf_jsonify.so';\n\n-- **** IP functions ****\nCREATE OR REPLACE FUNCTION ip_validate RETURNS string SONAME 'libudf_net.so';\nCREATE OR REPLACE FUNCTION ip_to_canonical RETURNS string SONAME 'libudf_net.so';\nCREATE OR REPLACE FUNCTION ip_to_ipv6_mapped RETURNS string SONAME 'libudf_net.so';\n\n-- **** string operation functions ****\nCREATE OR REPLACE FUNCTION levenshtein RETURNS integer SONAME 'libudf_stringops.so'\nCREATE OR REPLACE FUNCTION levenshtein_normalized RETURNS real SONAME 'libudf_stringops.so'\n\n-- **** random string generation ****\nCREATE OR REPLACE FUNCTION lipsum RETURNS string SONAME 'libudf_lipsum.so';\n\n-- **** UUID interfaces ****\nCREATE OR REPLACE FUNCTION uuid_generate_v1 RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_generate_v1mc RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_generate_v4 RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_generate_v6 RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_generate_v7 RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_nil RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_max RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_ns_dns RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_ns_url RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_ns_oid RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_ns_x500 RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_is_valid RETURNS integer SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_to_bin RETURNS string SONAME 'libudf_uuid.so';\nCREATE OR REPLACE FUNCTION uuid_from_bin RETURNS string SONAME 'libudf_uuid.so';\n-- `bin_to_uuid` and 'uuid_from_bin' are aliases\nCREATE OR REPLACE FUNCTION bin_to_uuid RETURNS string SONAME 'libudf_uuid.so';\n```\n\nNote that Windows `.dll`s are built but have not been tested - please open an\nissue if you encounter any errors.\n\n[releases]: https://github.com/pluots/udf-suite/releases\n\n\n### Building from Source\n\nTo build the binaries yourself, you can clone this repository and run:\n\n```sh\ncargo build --release\n```\n\nWhich will produce the desired dynamic library files in `target/release`.\nSpecific functions can also be specified with `-p` (e.g.\n`cargo build --release -p udf-uuid`).\n\nThis repository also comes with a docker file that simplifies getting an image\nup and running:\n\n```sh\n# build the image\ndocker build . --tag mdb-udf-suite-img\n\n# run it in the background\ndocker run --rm -d \\\n  -e MARIADB_ROOT_PASSWORD=example \\\n  --name mdb-udf-suite \\\n  mdb-udf-suite-img\n\n# Enter a SQL shell\ndocker exec -it mdb-udf-suite mariadb -pexample\n\n# Stop the server when done\ndocker stop mdb-udf-suite\n```\n\nThe UDFs can then be loaded using the `CREATE FUNCTION` statements above.\n\nThis project has a MSRV of 1.65, but makes no commitment to uphold this.\n\n\n## License\n\nThis work is dual-licensed under Apache 2.0 and GPL 2.0 (or any later version).\nYou can choose either of them if you use this work.\n\n`SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluots%2Fudf-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpluots%2Fudf-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluots%2Fudf-suite/lists"}