renaming some sqlstatement generation to lte/gte.

This commit is contained in:
mike12345567 2024-04-17 17:13:08 +01:00
parent 60ed4d8443
commit 58d4b2b56e
2 changed files with 4 additions and 4 deletions

View File

@ -313,9 +313,9 @@ class InternalBuilder {
if (lowValid && highValid) {
query = sqlStatements.between(query, key, value.low, value.high)
} else if (lowValid) {
query = sqlStatements.lower(query, key, value.low)
query = sqlStatements.lte(query, key, value.low)
} else if (highValid) {
query = sqlStatements.higher(query, key, value.high)
query = sqlStatements.gte(query, key, value.high)
}
})
}

View File

@ -44,7 +44,7 @@ export class SqlStatements {
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
const field = this.getField(key)
if (
@ -61,7 +61,7 @@ export class SqlStatements {
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)
// Use just a single less than operator if we only have a high
if (