Key

new Key(options)
abstract

Key

Parameters:
  • options
    • Type: Object
      • id
        • Type: string or integer
      • prefix
        • Type: string
      • postfix
        • Type: string
        • Default: ""
      • delimiter
        • Type: string
        • Default: "_"
      • caseSensitive
        • Type: Boolean
        • Default: true
Throws:
  • Error
clone()Key
Returns: Key
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:
Returns: Promise<Error>
getId()
Parameters:
  • <undefined>
    • Type: string
getOptions()KeyOptionsObject
Returns: KeyOptionsObject
isGenerated()boolean
Returns: boolean
parse(key)Key
Parameters:
  • key
    • Type: string
    • whole key of a document

Returns: Key
setId(id)undefined
Parameters:
  • id
    • Type: string
Returns: undefined
toString()string

returns the key

Returns: string
comments powered by Disqus