JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 34
  • Score
    100M100P100Q56791F
  • License MIT

Generate objects from SQL output with grouping and mapping.

Package Exports

  • qlmapper

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (qlmapper) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

#QLMapper

Create an object or an array of objects from sql output. Used for handling joins and generating grouped objects from columns.

usage

var QLMapper = require('qlmapper');
var row = {"orderId":"300000", "__user__name":"Vahagn","__user__id":200};
var object = QLMapper(row,["user"]);

This will generate:

{
    "user": {
        "name": "Vahagn",
        "id": 200
    },
    "orderId": "300000"
}