Skip to content

Instantly share code, notes, and snippets.

@line-o
Last active April 27, 2018 15:23
Show Gist options
  • Select an option

  • Save line-o/a1b38c98cd2b4f7764dcc286039ff931 to your computer and use it in GitHub Desktop.

Select an option

Save line-o/a1b38c98cd2b4f7764dcc286039ff931 to your computer and use it in GitHub Desktop.
util:log data serialization
xquery version "3.1";
declare variable $local:testmap := map{'a':'b'};
declare variable $local:testarray := array{ (0, '1', (1,2,3)) };
util:log('info', $local:testmap),
util:log('info', ($local:testmap)),
util:log('info', serialize($local:testmap)),
util:log('info', ($local:testmap)?a),
util:log('info', $local:testarray),
util:log('info', serialize($local:testarray)),
util:log('info', $local:testarray?*)
(:~ existDB 4.1.0 output ~
(Line: 6 String)
(Line: 7 String)
(Line: 8 String)
(Line: 9 String) b
(Line: 10 String)
(Line: 11 String)
(Line: 12 String) 01123
~~~~~~~~~~~~~~~~~~~~~~~~~~:)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment