Methods
(static) existsCondition(rightValue)
Parameters:
Name | Type | Description |
---|---|---|
rightValue |
* | value to check if empty |
Returns:
- true if NOT empty
(static) getComparisonFunction(operator) → {function}
Parameters:
Name | Type | Description |
---|---|---|
operator |
String | SQL comparison operator. |
Returns:
}}
- Type
- function
(static) inCondition(leftValue, rightValue) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
leftValue |
any | value to find in right value |
rightValue |
String | list of comma separated values |
Returns:
- Is contained IN list.
- Type
- Boolean
(static) isCondition(leftValue, rightValue) → {Boolean}
- Description:
If leftValue is empty (we will consider that as NULL), condition will be true
- Source:
Parameters:
Name | Type | Description |
---|---|---|
leftValue |
any | test this value for NULL |
rightValue |
any | 'NULL' considered as NULL. |
Returns:
- Is leftValue NULL (like).
- Type
- Boolean
(static) likeCondition(leftValue, rightValue) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
leftValue |
String | string for comparison |
rightValue |
String | string with wildcard |
Returns:
- Do strings match?
- Type
- Boolean
(static) likeConditionMatch(leftValue, rightValue) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
leftValue |
String | string for comparison |
rightValue |
String | string with wildcard |
Returns:
- Found position (not found === -1)
- Type
- Number
(static) notLikeCondition(leftValue, rightValue) → {Boolean}
Parameters:
Name | Type | Description |
---|---|---|
leftValue |
String | string for comparison |
rightValue |
String | string with wildcard |
Returns:
- Do strings NOT match?
- Type
- Boolean