{"id":18806731,"url":"https://github.com/lefred/mysql-graalvm-examples","last_synced_at":"2026-01-25T12:32:24.766Z","repository":{"id":236620609,"uuid":"775387098","full_name":"lefred/mysql-graalvm-examples","owner":"lefred","description":"MySQL GraalVM Examples","archived":false,"fork":false,"pushed_at":"2024-03-21T09:47:09.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-22T01:09:27.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lefred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-03-21T09:46:58.000Z","updated_at":"2024-03-21T09:47:13.000Z","dependencies_parsed_at":"2024-04-28T04:09:23.196Z","dependency_job_id":"948268ee-dc9f-495f-be3a-350b399b2257","html_url":"https://github.com/lefred/mysql-graalvm-examples","commit_stats":null,"previous_names":["lefred/mysql-graalvm-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lefred/mysql-graalvm-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-graalvm-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-graalvm-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-graalvm-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-graalvm-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lefred","download_url":"https://codeload.github.com/lefred/mysql-graalvm-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lefred%2Fmysql-graalvm-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28752980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T10:25:12.305Z","status":"ssl_error","status_checked_at":"2026-01-25T10:25:11.933Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-07T22:49:25.030Z","updated_at":"2026-01-25T12:32:24.737Z","avatar_url":"https://github.com/lefred.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mysql-graalvm-examples\n\nThis repository contains examples of functions using GraalVM (MLE) for\nMySQL Enterprise or MySQL HeatWave.\n\n# JS\n\nThe current examples are writen in Javascript, the only supported language for the momement.\n\n## UUIDv1\n\nThese functions provides support to extrace the timestamp information of native UUID format (v1)\nused in MySQL.\n\n* `js_uuid_to_unixtime(\u003cuuid\u003e)`: it returns the unixtime of the UUID.\n\n```\nMySQL \u003e select js_uuid_to_unixtime(uuid());\n+-----------------------------+\n| js_uuid_to_unixtime(uuid()) |\n+-----------------------------+\n| 1710957383.554              |\n+-----------------------------+\n1 row in set (0.0020 sec)\n\nMySQL \u003e select from_unixtime(js_uuid_to_unixtime(uuid()));\n+--------------------------------------------+\n| from_unixtime(js_uuid_to_unixtime(uuid())) |\n+--------------------------------------------+\n| 2024-03-20 17:56:31.555000                 |\n+--------------------------------------------+\n1 row in set (0.0008 sec)\n```\n\n* `js_uuid_to_datetime(\u003cuuid\u003e)`: this function return the date time of the UUID in a more human readable format.\n\n```\nMySQL \u003e select js_uuid_to_datetime(uuid());\n+-----------------------------+\n| js_uuid_to_datetime(uuid()) |\n+-----------------------------+\n| 2024-03-20 17:56:39.118     |\n+-----------------------------+\n1 row in set (0.0027 sec)\n```\n\n* `js_uuid_to_datetime_log(\u003cuuid\u003e)`: same as the previous function but with even more details.\n\n```\nMySQL \u003e select js_uuid_to_datetime_long(uuid());\n+---------------------------------------------+\n| js_uuid_to_datetime_long(uuid())            |\n+---------------------------------------------+\n| Wednesday, March 20, 2024 at 5:56:46 PM GMT |\n+---------------------------------------------+\n1 row in set (0.0063 sec)\n```\n\n## UUIDv7\n\nThis set of functions provides the creation and the time stamp's extraction of UUIDv7.\n\n* `js_uuidv7()`: generates a UUIDv7.\n\n```\nMySQL \u003e select js_uuidv7();\n+--------------------------------------+\n| js_uuidv7()                          |\n+--------------------------------------+\n| 018e6064-a472-7511-e89b-e9f5141b86ec |\n+--------------------------------------+\n1 row in set (0.0007 sec)\n```\n\n* `js_uuidv7_to_unixtime(\u003cuuid\u003e)`: it returns the unixtime of the UUIDv7.\n\n```MySQL \u003e select js_uuidv7_to_unixtime(\"018e5e04-ba34-780f-6a68-3ba37f00ca27\");\n+---------------------------------------------------------------+\n| js_uuidv7_to_unixtime(\"018e5e04-ba34-780f-6a68-3ba37f00ca27\") |\n+---------------------------------------------------------------+\n| 1710974351.924                                                |\n+---------------------------------------------------------------+\n1 row in set (0.0009 sec)\n```\n\n* `js_uuidv7_to_datetime(\u003cuuid\u003e)`: this function return the date time of the UUIDv7 in a more human readable format.\n\n```\nMySQL \u003e select js_uuidv7_to_datetime(\"018e5e04-ba34-780f-6a68-3ba37f00ca27\");\n+---------------------------------------------------------------+\n| js_uuidv7_to_datetime(\"018e5e04-ba34-780f-6a68-3ba37f00ca27\") |\n+---------------------------------------------------------------+\n| 2024-03-20 22:39:11.924                                       |\n+---------------------------------------------------------------+\n1 row in set (0.0009 sec)\n```\n* `js_uuidv7_to_datetime_long(\u003cuuid\u003e)`: same as the previous function but with even more details.\n\n```\nMySQL \u003e select js_uuidv7_to_datetime_long(\"018e5e04-ba34-780f-6a68-3ba37f00ca27\");\n+--------------------------------------------------------------------+\n| js_uuidv7_to_datetime_long(\"018e5e04-ba34-780f-6a68-3ba37f00ca27\") |\n+--------------------------------------------------------------------+\n| Wednesday, March 20, 2024 at 10:39:11 PM GMT                       |\n+--------------------------------------------------------------------+\n1 row in set (0.0013 sec)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fmysql-graalvm-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flefred%2Fmysql-graalvm-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flefred%2Fmysql-graalvm-examples/lists"}