Methods
-
<static> createMethodSignature(error, data)
createMethodSignature Create default signature method object.
-
createMethodSignature Create default signature method object
Parameters:
Name Type Description error
string | object The string or error object if have any data
object | array | number | string | boolean Information about method execution Returns:
-
signature - Default methods signature format { error, data }
- Type
- object
-
signature.error - Execution error
- Type
- string | object
-
signature.data - Execution data
- Type
- object | array | number | string | boolean
-
-
<static> genDbName(appName)
genDbName generates a database name.
-
genDbName generates a database name
Parameters:
Name Type Description appName
string Voodux Application Instance name Returns:
dbName / uuid- Type
- string
-
<static> getSearchTokenStream()
getSearchTokenStream generates a lunr search token.
-
getSearchTokenStream generates a lunr search token. See lunr search
Returns:
token- Type
- array
-
<static> mongooseToDexieTableString()
mongooseToDexieTableString convert given Mongoose schema to a Dexie Table columns configuration.
-
mongooseToDexieTableString convert given Mongoose schema to a Dexie Table columns configuration.
All columns inside returned configuration are indexed at IndexedDB prepend __id as local primary key and _id for remote primary key Local primary key is integer and auto incrementedReturns:
Dexie table configuration string- Type
- string
-
<static> toJSON(obj)
toJSON - stringify and parse an object
It uses native JSON internally. -
toJSON - stringify and parse an object
It uses native JSON internally.Parameters:
Name Type Description obj
string | object Valid JSON object or string Returns:
new JSON object- Type
- object
-
<static> uuid()
uuid generates a Universally unique identifier string.
-
uuid generates a Universally unique identifier string
Returns:
guid / uuid- Type
- string
-
<inner> getCompoundIndexes(notIndexed, schema)
PRIVATE getCompoundIndexes() - get compound indexes in a schema
-
Compound keys are NOT initially indexed on schema property level,
then we need to iterate over schema._index[0], which is the arrray containing all indexes including the compoundsParameters:
Name Type Description notIndexed
array name of not indexes columns/properties. schema
object data schema object instance Returns:
compoundIndexes- Type
- array