namirasoft-core
Advanced tools
Comparing version 1.3.50 to 1.3.51
import { FilterItemOperator } from "./FilterItemOperator"; | ||
export declare class FilterItem { | ||
column: string; | ||
table: { | ||
name: string; | ||
text: string; | ||
}; | ||
column: { | ||
name: string; | ||
text: string; | ||
}; | ||
not: boolean; | ||
@@ -9,3 +16,9 @@ operator: FilterItemOperator; | ||
static parse(item: string | null): FilterItem[]; | ||
constructor(column: string, not: boolean, operator: FilterItemOperator, ...values: string[]); | ||
constructor(table: { | ||
name: string; | ||
text: string; | ||
}, column: { | ||
name: string; | ||
text: string; | ||
}, not: boolean, operator: FilterItemOperator, ...values: string[]); | ||
getCommand(): string; | ||
@@ -12,0 +25,0 @@ isAllColumns(): boolean; |
@@ -18,6 +18,8 @@ "use strict"; | ||
throw new Error("Invalid value for FilterItem: " + item); | ||
let columnIndex = i; | ||
let notIndex = i + 1; | ||
let operatorIndex = i + 2; | ||
let valueIndex = i + 3; | ||
let tableIndex = i; | ||
let columnIndex = i + 1; | ||
let notIndex = i + 2; | ||
let operatorIndex = i + 3; | ||
let valueIndex = i + 4; | ||
let table = items[tableIndex]; | ||
let column = items[columnIndex]; | ||
@@ -33,3 +35,3 @@ let not = items[notIndex] != "0"; | ||
} | ||
ans.push(new FilterItem(column, not, operator, ...values)); | ||
ans.push(new FilterItem({ name: table, text: table }, { name: column, text: column }, not, operator, ...values)); | ||
i += 3 + operator.count; | ||
@@ -40,3 +42,4 @@ } | ||
} | ||
constructor(column, not, operator, ...values) { | ||
constructor(table, column, not, operator, ...values) { | ||
this.table = table; | ||
this.column = column; | ||
@@ -53,3 +56,3 @@ this.not = not; | ||
isAllColumns() { | ||
return this.column === "*"; | ||
return this.column.name === "*"; | ||
} | ||
@@ -56,0 +59,0 @@ toString() { |
@@ -11,3 +11,3 @@ { | ||
"private": false, | ||
"version": "1.3.50", | ||
"version": "1.3.51", | ||
"author": "Amir Abolhasani", | ||
@@ -14,0 +14,0 @@ "license": "MIT", |
@@ -5,3 +5,10 @@ import { FilterItemOperator } from "./FilterItemOperator"; | ||
{ | ||
public column: string; | ||
public table: { | ||
name: string; | ||
text: string; | ||
}; | ||
public column: { | ||
name: string; | ||
text: string; | ||
}; | ||
public not: boolean; | ||
@@ -26,6 +33,8 @@ public operator: FilterItemOperator; | ||
throw new Error("Invalid value for FilterItem: " + item); | ||
let columnIndex = i; | ||
let notIndex = i + 1; | ||
let operatorIndex = i + 2; | ||
let valueIndex = i + 3; | ||
let tableIndex = i; | ||
let columnIndex = i + 1; | ||
let notIndex = i + 2; | ||
let operatorIndex = i + 3; | ||
let valueIndex = i + 4; | ||
let table = items[tableIndex]; | ||
let column = items[columnIndex]; | ||
@@ -42,3 +51,3 @@ let not = items[notIndex] != "0"; | ||
} | ||
ans.push(new FilterItem(column, not, operator, ...values)); | ||
ans.push(new FilterItem({ name: table, text: table }, { name: column, text: column }, not, operator, ...values)); | ||
i += 3 + operator.count; | ||
@@ -49,4 +58,5 @@ } | ||
} | ||
constructor(column: string, not: boolean, operator: FilterItemOperator, ...values: string[]) | ||
constructor(table: { name: string; text: string }, column: { name: string; text: string }, not: boolean, operator: FilterItemOperator, ...values: string[]) | ||
{ | ||
this.table = table; | ||
this.column = column; | ||
@@ -65,3 +75,3 @@ this.not = not; | ||
{ | ||
return this.column === "*"; | ||
return this.column.name === "*"; | ||
} | ||
@@ -68,0 +78,0 @@ toString() |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
354436
4469