Skip to content

Releases: hsu-aut/sparql-result-converter

v3.0.1

10 Sep 09:58
aed38c1
Compare
Choose a tag to compare

For elements that could not be grouped, an empty array is returned (was undefined before)
This allows applications using this lib to handle converted data more gracefully as there is no need to check for undefined

v3.0.0

06 Sep 11:45
e271671
Compare
Choose a tag to compare

Adds another breaking change to the API

  • There are now three utility functions that have to be called to get the final result after calling convertToDefinition(). These functions were necessary to create a result similar to an original SPARQL query result in case there are no results. The functions are:
    • getAll() ->Returns the output that was previously returned by convertToDefinition(), i.e. the complete mapped object
    • getFirstRootElement() -> Convenient helper in case there is just one root element. Returns the grouped content for this element
    • get(key: string) -> Returns the mapped content of a root element given by key
  • Furthermore, you can now specify whether or not you want to keep all ungrouped elements as "children". This is done by setting the boolean parameter keepUngroupedContents in convertToDefinition(inputArray, mappingDefinitions, keepUngroupedContents). It's true by default.

v.2.0.2

01 Sep 13:49
5cac740
Compare
Choose a tag to compare

Quick fix for a little mistake that made the whole Converter unusable: The main method "convertToDefintion" was set to private.

v2.0.1

31 Aug 16:38
Compare
Choose a tag to compare
  • Adds a minor bug fix that lead to adding empty children elements into the mapped object

v2.0.0

18 Aug 16:03
2b9fb9e
Compare
Choose a tag to compare

New major release with breaking changes to the API:

  • structure of mapping definitions has changed to allow for nested mappings with multiple properties on one layer
  • convert-function has been renamed to allow for other convert-functions in the future (e.g. for converting directly into a class)