Constructor
- options
- Type:
Object - id
- Type:
stringorinteger - prefix
- Type:
string - postfix
- Type:
string - Default:
"" - delimiter
- Type:
string - Default:
"_" - caseSensitive
- Type:
Boolean - Default:
true -
Error
new Key(options)
abstract
Key
Parameters:
Throws:
Methods
- instance
- Type:
Instance - <undefined>
- Type:
string - id
- Type:
string
generate(instance)
Promise<Error>
abstract
generates an id for the key This method is called before inserting new document to a bucket The method must return a Prosime Unless overriden this method always return rejected Promise with an Error
Parameters:
Promise<Error>
getId()
Parameters:
getOptions()
KeyOptionsObject
Returns:
KeyOptionsObject
isGenerated()
boolean
Returns:
boolean
setId(id)
undefined
Parameters:
undefined
toString()
string
returns the key
Returns:string