+
+ private addCondition(field: keyof T, cond: string, value?: string | string[], prefix: string = "", postfix: string = "") {
+ if (value) {
+ value = typeof value === "string"
+ ? `"${prefix}${value}${postfix}"`
+ : `["${value.join(`","`)}"]`;
+
+ const resourcePrefix = this.resourcePrefix
+ ? _.snakeCase(this.resourcePrefix) + "."
+ : "";
+
+ this.filters += `${this.getSeparator()}["${resourcePrefix}${_.snakeCase(field.toString())}","${cond}",${value}]`;
+ }
+ return this;
+ }
+
+ private getSeparator () {
+ return this.filters ? "," : "";
+ }