Methods
(static) analyzeParts(parts_order, parts) → {Object}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
parts_order |
Array.<String> | |
parts |
Array.<String> |
Returns:
- Type
- Object
(static) generateSqlSeparatorWords(keywords) → {Array.<Array.<String>>}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
keywords |
Array.<String> |
Returns:
- Type
- Array.<Array.<String>>
(static) generateUsedKeywordList(query) → {Array.<String>}
- Description:
Returns a list of all keywords used in their original CASE.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
String |
Returns:
- Type
- Array.<String>
(static) getPositionsOfSqlParts(modifiedQuery, parts_name) → {Array.<String>}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
modifiedQuery |
String | |
parts_name |
Array.<String> |
Returns:
- Type
- Array.<String>
(static) hideInnerSql(str, parts_name_escaped, replaceFunction)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
str |
String | |
parts_name_escaped |
Array.<String> | |
replaceFunction |
Object |
(static) protect(str) → {String}
- Description:
Add some # inside a string to avoid it to match a regex/split
- Source:
Parameters:
Name | Type | Description |
---|---|---|
str |
String |
Returns:
- Type
- String
(static) removeDuplicateEntries(parts_order)
- Description:
Delete duplicates (caused, for example, by JOIN and INNER JOIN)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
parts_order |
Array.<String> |
(static) reorganizeJoins(result)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
result |
Object |
(static) reorganizeSpecificJoin(result, joinName, joinType)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
result |
Object | |
joinName |
String | |
joinType |
String |
(static) resolveSqlCondition(logic, terms) → {String}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
logic |
String | |
terms |
Object |
Returns:
- Type
- String
(static) sql2ast(query) → {Object}
- Description:
Parse a query
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
String |
Returns:
- Type
- Object
(static) sqlCondition2JsCondition(cond) → {String}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
cond |
String |
Returns:
- Type
- String
(static) unprotect(str) → {String}
- Description:
Restore a string output by protect() to its original state
- Source:
Parameters:
Name | Type | Description |
---|---|---|
str |
String |
Returns:
- Type
- String