renaming some sqlstatement generation to lte/gte.
This commit is contained in:
parent
60ed4d8443
commit
58d4b2b56e
|
@ -313,9 +313,9 @@ class InternalBuilder {
|
||||||
if (lowValid && highValid) {
|
if (lowValid && highValid) {
|
||||||
query = sqlStatements.between(query, key, value.low, value.high)
|
query = sqlStatements.between(query, key, value.low, value.high)
|
||||||
} else if (lowValid) {
|
} else if (lowValid) {
|
||||||
query = sqlStatements.lower(query, key, value.low)
|
query = sqlStatements.lte(query, key, value.low)
|
||||||
} else if (highValid) {
|
} else if (highValid) {
|
||||||
query = sqlStatements.higher(query, key, value.high)
|
query = sqlStatements.gte(query, key, value.high)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class SqlStatements {
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
|
|
||||||
lower(query: Knex.QueryBuilder, key: string, low: number | string) {
|
lte(query: Knex.QueryBuilder, key: string, low: number | string) {
|
||||||
// Use just a single greater than operator if we only have a low
|
// Use just a single greater than operator if we only have a low
|
||||||
const field = this.getField(key)
|
const field = this.getField(key)
|
||||||
if (
|
if (
|
||||||
|
@ -61,7 +61,7 @@ export class SqlStatements {
|
||||||
return query
|
return query
|
||||||
}
|
}
|
||||||
|
|
||||||
higher(query: Knex.QueryBuilder, key: string, high: number | string) {
|
gte(query: Knex.QueryBuilder, key: string, high: number | string) {
|
||||||
const field = this.getField(key)
|
const field = this.getField(key)
|
||||||
// Use just a single less than operator if we only have a high
|
// Use just a single less than operator if we only have a high
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue