isId
isId(
value):value is string
A valid UUID. Note we do not check for a specific UUID version (which may have range limitations on elements). So this is not strict to RFC4122 / RFC9562. The main reason is that these identifiers may be user-supplied and are not fully internal to Alpyne. The user is free to submit any It follows the same rules as the native UUID in PostgreSQL. Note the spec is unclear, but you can demonstrate with:
-- Drop table if it existsDROP TABLE IF EXISTS test_uuids;
-- Create a table with a UUID columnCREATE TABLE test_uuids ( id UUID PRIMARY KEY);
-- Insert valid UUIDsINSERT INTO test_uuids (id) VALUES ('550e8400-e29b-41d4-a716-446655440000'); -- Valid v4INSERT INTO test_uuids (id) VALUES ('123e4567-e89b-12d3-a456-426614174000'); -- Valid v1INSERT INTO test_uuids (id) VALUES ('123e4567-e89b-72d3-a456-426614174000'); -- Valid v7
-- Insert non-version-compliant UUIDs (PostgreSQL should still accept them)INSERT INTO test_uuids (id) VALUES ('00000000-0000-0000-0000-000000000000'); -- No valid versionINSERT INTO test_uuids (id) VALUES ('550e8400-e29b-00d4-a716-446655440000'); -- Version 0 (invalid)INSERT INTO test_uuids (id) VALUES ('550e8400-e29b-61d4-a716-446655440000'); -- Version 6 (not standard)INSERT INTO test_uuids (id) VALUES ('550e8400-e29b-f1d4-a716-446655440000'); -- Version f (invalid)
-- Retrieve inserted rowsSELECT * FROM test_uuids;Our UUIDs are LOWERCASE; similarly as this is the PostgreSQL default.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”value is string

