Consider implementing a guid()
function.
#44
Unanswered
springcomp
asked this question in
Q&A
Replies: 2 comments 11 replies
-
Can we also specify uppercase ? |
Beta Was this translation helpful? Give feedback.
1 reply
-
My major concern with this is that we are getting into generating data rather than just transforming it. Is this out of scope for JMESPath? This would also remove the idempotent nature of queries, pulling in other implications. |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A
guid()
function that outputs a string representing a globally unique identifier.Returns an RFC4122-compliant string representation of a globally unique identifier.
The format specifier is optional. If it is an empty string or the default value
"d"
, the function returns a string with the following format:The accepted format specifiers are listed in the following table:
`"n"`
"00000000000000000000000000000000"
`"d"`
"00000000-0000-0000-0000-000000000000"
`"u"`
"urn:uuid:00000000-0000-0000-0000-000000000000"
Those familiar with Microsoft would also be familiar with the two following format specifiers:
`"b"`
"{00000000-0000-0000-0000-000000000000}"
`"p"`
"(00000000-0000-0000-0000-000000000000)"
guid()
"b14b6399-3a6d-4fa9-a5cb-5fba2331818e"
guid(`""`)
"b14b6399-3a6d-4fa9-a5cb-5fba2331818e"
guid(`"n"`)
"b14b63993a6d4fa9a5cb5fba2331818e"
guid(`"d"`)
b14b6399-3a6d-4fa9-a5cb-5fba2331818e"
guid(`"u"`)
"urn:uuid:b14b6399-3a6d-4fa9-a5cb-5fba2331818e"
guid(`"b"`)
"{b14b6399-3a6d-4fa9-a5cb-5fba2331818e}"
guid(`"p"`)
"(b14b6399-3a6d-4fa9-a5cb-5fba2331818e)"
Alternate name
This function can also be named
uuid()
.Beta Was this translation helpful? Give feedback.
All reactions