Skip to content

ArturAralin/knex-elephant

Repository files navigation

knex-elephant

PostgreSQL special sql functions for Knex library

Functions support

JSON

  • json[b] operators
  • advanced json[b] operators
  • json[b] builders
  • json[b] transformers (e.g. json_each)

Array

  • array operators
  • array transformers

how to use

import { jsonBuildObject } from 'knex-elephant';

knex
  .select([
    jsonBuildObject({
      fieldName: 10,
    }).as('myAlias'),
  ])
  .toString();

  // select json_build_object('fieldName', 10) as "myAlias"

About

PostgreSQL special sql functions for Knex library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published