fastquery-builder
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -12,2 +12,2 @@ const clickhouseFormat = (clickhouseObj) => { | ||
export default clickhouseFormat; | ||
module.exports = clickhouseFormat; |
@@ -1,2 +0,2 @@ | ||
export function transformFilter(col, value) { | ||
function transformFilter(col, value) { | ||
if (Array.isArray(value)) return `${col} IN (${value})`; | ||
@@ -9,3 +9,3 @@ return `${col} = ${value}`; | ||
*/ | ||
export function where(list) { | ||
function where(list) { | ||
return list.reduce((acc, filter, index) => { | ||
@@ -17,3 +17,3 @@ if (index === 0) return `WHERE ${filter}`; | ||
export function having(list) { | ||
function having(list) { | ||
return list.reduce((acc, filter, index) => { | ||
@@ -123,3 +123,3 @@ if (index === 0) return `HAVING ${filter}`; | ||
export const conditionalWhere = { | ||
module.exports = { | ||
equal: conditionalWhereEqual, | ||
@@ -136,2 +136,5 @@ op: conditionalWhereOp, | ||
arrayAll: conditionalWhereArrayAll, | ||
transformFilter, | ||
where, | ||
having, | ||
}; |
@@ -1,2 +0,7 @@ | ||
export { default as clickhouseFormat } from './clickhouseFormat.js'; | ||
export * from './handleQueries.js'; | ||
const clickhouseFormat = require('./clickhouseFormat') | ||
const handleQueries = require('./handleQueries') | ||
module.exports = { | ||
clickhouseFormat, | ||
...handleQueries, | ||
} |
{ | ||
"name": "fastquery-builder", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Make your query fast and build it easly", | ||
"main": "index.js", | ||
"repository": "git@github.com:3fydev/fastquery.git", | ||
"type": "module", | ||
"keywords": [ | ||
@@ -9,0 +8,0 @@ "fast", |
5382
135
No