Members
(constant) compareColumns
compareColumns compare table columns when sorting
- Source:
(constant) createNewId
createNewId base function for create fake id for new data
- Source:
(constant) getEmailNotifications :Array.<string>
getEmailNotifications events with possible email notification
- Source:
Type:
-
Array.<string>
(constant) getStoreCaptchaPages :Array.<string>
getStoreCaptchaPages pages with possible captchas
- Source:
Type:
-
Array.<string>
(constant) setter
setter base function for setting fields on detail view
- Source:
(constant) setterDate
setterDate base function for setting fields on detail view
- Source:
(constant) setterSpread
setterSpread spread all params in onSet used in LanguageInputBlock
- Source:
Methods
addDateCondition(query, search, field, likes, equals) → {*}
addDateCondition add dates conditions to the query
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
||
search |
||
field |
||
likes |
||
equals |
Returns:
- Type:
-
*
addOrCondition(query, search, field, likes, equals)
addOrCondition adds OR conditions to the query
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
||
search |
||
field |
||
likes |
||
equals |
allowedFields(search, allowed)
allowedFields clarifies the table if it is transmitted
- Source:
Parameters:
Name | Type | Description |
---|---|---|
search |
Object
|
of search |
allowed |
Array
|
of allowed fields |
Returns:
Object
createImageRegexp(formats) → {RegExp}
createImageRegexp, create a regexp for image files
- Source:
Parameters:
Name | Type | Description |
---|---|---|
formats |
Returns:
- Type:
-
RegExp
formBreadcrumbPath()
formBreadcrumbPath forms path for breadcrumbs
- Source:
objectQueries(search, allowed, like)
objectQueries remove unusable in query group_by year, and separate date if they period
- Source:
Parameters:
Name | Type | Description |
---|---|---|
search |
Object
|
|
allowed |
Array
|
of allowed fields |
like |
Array
|
of like fields |
Returns:
Object
parseCustomer(context) → {*}
parseCustomer prepare customer to validation
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Returns:
- Type:
-
*
parseProduct(context) → {*}
parseProduct prepare product to validation
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Returns:
- Type:
-
*
parseQueryParam(query, search, field, likes, equals) → {*}
parseQueryParam adds basic params to query
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
||
search |
||
field |
||
likes |
||
equals |
Returns:
- Type:
-
*
parseReturn(context) → {*}
parseReturn prepare return to validation
- Source:
Parameters:
Name | Type | Description |
---|---|---|
context |
Returns:
- Type:
-
*
prepareExports(globalExports, nestedExports) → {function}
prepareExports combine previous exports with exports for current element
- Source:
Parameters:
Name | Type | Description |
---|---|---|
globalExports |
Object
|
|
nestedExports |
Object
|
Returns:
- Type:
-
function
prepareHook(hook)
prepareHook removes support params from hook
- Source:
Parameters:
Name | Type | Description |
---|---|---|
hook |
prepareImports(exports, imports) → {Object}
prepareImports take imports from global import for current element
- Source:
Parameters:
Name | Type | Description |
---|---|---|
exports |
Object
|
|
imports |
Object
|
Returns:
- Type:
-
Object
prepareNested(nested, resource, makeExports, created) → {*|Object}
prepareNested prepare nested resource for loading to DB
- Source:
Parameters:
Name | Type | Description |
---|---|---|
nested |
||
resource |
||
makeExports |
||
created |
Returns:
- Type:
-
*
|Object
processNested(nestedFields, transaction, data, id, exports) → {*}
processNested process nested fields, update and create models in DB
Parameters:
Name | Type | Description |
---|---|---|
nestedFields |
||
transaction |
||
data |
||
id |
||
exports |
Returns:
- Type:
-
*
recursiveSearch(arr, value, id) → {*}
recursiveSearch search in array recursively
- Source:
Parameters:
Name | Type | Description |
---|---|---|
arr |
||
value |
||
id |
Returns:
- Type:
-
*
removeFakeId(item) → {*}
removeFakeId removes fake ids
- Source:
Parameters:
Name | Type | Description |
---|---|---|
item |
Returns:
- Type:
-
*
searchToWhereString(search, allowed, table, like, where)
searchToWhereString convert query to part of SQL String
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
search |
|||
allowed |
Array
|
of allowed fields |
|
table |
table of database |
||
like |
Array
|
params which match with likes |
|
where |
Boolean
|
true |
Returns:
String
targetTable(tableName, currentElement)
targetTable clarifies the table if it is transmitted
- Source:
Parameters:
Name | Type | Description |
---|---|---|
tableName |
String
|
table name of database |
currentElement |
String
|
column name |
Returns:
String
updateOrCreate(transaction, model, resource) → {Promise}
updateOrCreate update a resource or create new one if it's not present
Parameters:
Name | Type | Description |
---|---|---|
transaction |
Sequelize.Transaction
|
|
model |
Sequelize.Model
|
|
resource |
Object
|
Returns:
- Type:
-
Promise
withLikes(hook, likes, equals) → {Object}
withLikes convert query to like params
- Source:
Parameters:
Name | Type | Description |
---|---|---|
hook |
||
likes |
Array
|
params which match with likes |
equals |
Array
|
params which match with equals |
Returns:
- Type:
-
Object