fn:trace improvement

Tuesday, 26 August 2014 · 3 messages
MG
Marc van Grootel26 Aug 2014 09:51 #
Hi, Would it be possible to add automatic serialization of map and array types in fn:trace? When using it should be transparent but currently providing a map or array fails. To trace it I now use awkward code to do it since I have to call map:serialize and array:serialize myself. E.g. (fn:trace(map:serialize($map, 'X: ')), func($map))[2] Cheers, --Marc
CG
Christian Grün26 Aug 2014 10:59 #
Hi Marc,
Quoted text · Marc van Grootel · 2 lines
> Would it be possible to add automatic serialization of map and array > types in fn:trace?
Makes sense; or, better, made sense, as I've just extended fn:trace() and prof:dump() to also serialize maps and arrays. Beside that, any other function items can now be specified, too [1]. Best, Christian [1] http://files.basex.org/releases/latest/
Quoted text · Marc van Grootel · 7 lines
> When using it should be transparent but currently providing a map or > array fails. To trace it I now use awkward code to do it since I have > to call map:serialize and array:serialize myself. E.g. > (fn:trace(map:serialize($map, 'X: ')), func($map))[2] > > Cheers, > --Marc
MG
Marc van Grootel26 Aug 2014 11:17 #
Great. I'm going to download it right away and throw away the ugly workaround I had for this. It wasn't a big deal, but this is better. Thanks. --Marc
Quoted text · Christian Grün · 24 lines
On Tue, Aug 26, 2014 at 10:59 AM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Marc, > >> Would it be possible to add automatic serialization of map and array >> types in fn:trace? > > Makes sense; or, better, made sense, as I've just extended fn:trace() > and prof:dump() to also serialize maps and arrays. Beside that, any > other function items can now be specified, too [1]. > > Best, > Christian > > [1] http://files.basex.org/releases/latest/ > > >> When using it should be transparent but currently providing a map or >> array fails. To trace it I now use awkward code to do it since I have >> to call map:serialize and array:serialize myself. E.g. >> (fn:trace(map:serialize($map, 'X: ')), func($map))[2] >> >> Cheers, >> --Marc
-- --Marc

⚡Generated with XQuery