RefDocKey

Extends

new RefDocKey(options)

RefDocKey

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
      • ref
        • Type: Array
        • Default: [
        • array of document's properties from refDoc definition object

Throws:
  • KeyError

generate(Instance)

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

Parameters:
  • Instance
    • instance

Returns: Promise
parse(key)RefDocKey
Parameters:
  • key
    • Type: string
    • whole key of a document

Returns: RefDocKey
  • self
setId(string|Array)
Parameters:
  • string|Array
    • id

toString()

returns the key

Returns: string
clone()Key
Returns: Key
getId()
Parameters:
  • <undefined>
    • Type: string
isGenerated()boolean
Returns: boolean
comments powered by Disqus