IncrementalKey

Extends

new IncrementalKey(options)

IncrementalKey

Parameters:
  • options
    • Type: Object
      • id
        • Type: string or integer
      • prefix
        • Type: string
      • postfix
        • Type: string
        • Default: ""
      • delimiter
        • Type: string
        • Default: "_"
generate(instance)Promise<IncrementalKey>

generates new key This method is called before inserting new document to a bucket The method must return a prosime

Parameters:
Scope: IncrementalKey Returns: Promise<IncrementalKey>
setId(id)undefined
Parameters:
  • id
    • Type: string
Returns: undefined
clone()Key
Returns: Key
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
toString()string

returns the key

Returns: string
comments powered by Disqus