Skip to content

Commit

Permalink
simple help text with optional format parameter of uuid expression
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav authored and nyalldawson committed Oct 24, 2020
1 parent 70f7f8a commit e7e8729
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions resources/function_help/json/uuid
Expand Up @@ -3,21 +3,17 @@
"type": "function",
"groups": ["Record and Attributes"],
"description": "Generates a Universally Unique Identifier (UUID) for each row using the Qt <a href='https://doc.qt.io/qt-5/quuid.html#createUuid'>QUuid::createUuid</a> method.",
"variants": [
{
"variant": "No parameters",
"variant_description": "If called with no parameters, the function will generate the UUID with the default string format 'WithBraces'. Each UUID is 38 characters long.",
"arguments": [],
"examples": [ { "expression":"uuid()", "returns":"'{0bd2f60f-f157-4a6d-96af-d4ba4cb366a1}'" } ]
},
{
"variant": "A 'stringFormat' parameter",
"variant_description": "If called with a 'stringFormat' parameter, the function will generate the UUID and format it accordingly using Qt <a href='https://doc.qt.io/qt-5/quuid.html#StringFormat-enum'>QUuid::StringFormat</a>",
"arguments": [ { "arg": "stringFormat", "description": "The string format of the UUID. This can be 'WithBraces' to format with curly braces, 'WithoutBraces' to format without braces or 'Id128' to format only with hex digits, without braces or dashes." } ],
"examples": [
{ "expression": "uuid('WithoutBraces')", "returns": "'0bd2f60f-f157-4a6d-96af-d4ba4cb366a1'" },
{ "expression": "uuid('Id128')", "returns": "'0bd2f60ff1574a6d96afd4ba4cb366a1'" }
]
}
"arguments": [
{
"arg": "format",
"optional": true,
"default": "'WithBraces'",
"description": "The format, as the UUID will be formatted. 'WithBraces', 'WithoutBraces' or 'Id128'."
}
],
"examples": [
{ "expression":"uuid()", "returns":"'{0bd2f60f-f157-4a6d-96af-d4ba4cb366a1}'" },
{ "expression": "uuid('WithoutBraces')", "returns": "'0bd2f60f-f157-4a6d-96af-d4ba4cb366a1'" },
{ "expression": "uuid('Id128')", "returns": "'0bd2f60ff1574a6d96afd4ba4cb366a1'" }
]
}

0 comments on commit e7e8729

Please sign in to comment.