@peter.naydenov/dt-queries

1.1.0 • Public • Published

DT Queries

Note: Set of DT-toolbox query functions. You can use them for learning purposes or inspiration for how to build your own query functions for DT-Toolbox.

How to use the library

Library is a list of functions and you can take only the needed one.

import dtbox from 'dt-toolbox'
import { identical } from '@peter.naydenov/dt-queries'
// or require it:
// const identical = require ( '@peter.naydenov/dt-queries').identical;

const dt = dtbox.init ( a ) // a is some standard JS object
const result = dt.query ( identical, otherDtObject )  
// 'identiacal' query function expect one extra argument, that should be a dt-object

Query functions

Merge operations

  • Add
  • Update
  • Overwrite
  • Insert
  • Append
  • Prepend
  • Combine

Compare operations

  • Identical
  • Change
  • Different
  • Missing
  • Same

Extract operations

  • Keep segments
  • Remove segments

Segment Operations

  • SplitSegments: Splits a solid data into multiple data-segments;
  • JoinSegments : Consolidate multiple data-segments in a single solid data;
  • updateState : Updates the state with new data. Takes only declared data-segments and root data properties;

External Links

Credits

'@peter.naydenov/dt-queries' was created and supported by Peter Naydenov.

License

'@peter.naydenov/dt-queries' is released under the MIT License.

Package Sidebar

Install

npm i @peter.naydenov/dt-queries

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

86.9 kB

Total Files

27

Last publish

Collaborators

  • dreamgfx