@stoqey/sofa
Version:
Couchbase utilities
105 lines • 2.72 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CollectionSatisfiesOperatorDict = exports.CollectionInWithinOperatorDict = exports.CollectionSelectOperatorDict = exports.LogicalOperatorDict = exports.ComparisonMultipleOperatorDict = exports.ComparisonSingleStringOperatorDict = exports.ComparisonSingleOperatorDict = exports.ComparisonEmptyOperatorDict = exports.ReturnResultDict = exports.ResultExprDict = exports.AggDict = void 0;
/**
* Dictionary for handling aggregation functions.
* */
exports.AggDict = {
$arrayAgg: 'ARRAY_AGG',
$avg: 'AVG',
$mean: 'MEAN',
$count: 'COUNT',
$countn: 'COUNTN',
$max: 'MAX',
$median: 'MEDIAN',
$min: 'MIN',
$stddev: 'STDDEV',
$stddevPop: 'STDDEV_POP',
$stddevSamp: 'STDDEV_SAMP',
$sum: 'SUM',
$variance: 'VARIANCE',
$variancePop: 'VARIANCE_POP',
$varianceSamp: 'VARIANCE_SAMP',
$varPop: 'VAR_POP',
$varSamp: 'VAR_SAMP',
};
/**
* Dictionary for handling result expressions RAW | ELEMENT | VALUE
* */
exports.ResultExprDict = {
$raw: 'RAW',
$element: 'ELEMENT',
$value: 'VALUE',
};
/**
* Dictionary for handling result expressions ALL | DISTINCT
* */
exports.ReturnResultDict = {
$all: 'ALL',
$distinct: 'DISTINCT',
};
/**
* Dictionary for handling Boolean comparison operators
* */
exports.ComparisonEmptyOperatorDict = {
$isNull: 'IS NULL',
$isNotNull: 'IS NOT NULL',
$isMissing: 'IS MISSING',
$isNotMissing: 'IS NOT MISSING',
$isValued: 'IS VALUED',
$isNotValued: 'IS NOT VALUED',
};
/**
* Dictionary for handling Numeric comparison operators
* */
exports.ComparisonSingleOperatorDict = {
$eq: '=',
$neq: '!=',
$gt: '>',
$gte: '>=',
$lt: '<',
$lte: '<=',
};
/**
* Dictionary for handling String comparison operators
* */
exports.ComparisonSingleStringOperatorDict = {
$like: 'LIKE',
$notLike: 'NOT LIKE',
};
/**
* Dictionary for handling Range comparison operators
* */
exports.ComparisonMultipleOperatorDict = {
$btw: 'BETWEEN',
$notBtw: 'NOT BETWEEN',
};
/**
* Dictionary for handling logical operators
* */
exports.LogicalOperatorDict = {
$and: 'AND',
$or: 'OR',
$not: 'NOT',
};
/**
* Dictionary for handling collection select operators
* */
exports.CollectionSelectOperatorDict = {
$any: 'ANY',
$every: 'EVERY',
};
/**
* Dictionary for handling collection (in | within) operators
* */
exports.CollectionInWithinOperatorDict = {
$in: 'IN',
$within: 'WITHIN',
};
/**
* Dictionary for handling collection satisfies operators
* */
exports.CollectionSatisfiesOperatorDict = {
$satisfies: 'SATISFIES',
};
//# sourceMappingURL=dictionary.js.map