Types

FDB Payload

declare type FDBPayload = { 
  filter?: {
    attributes?: FDBAttribute,
    where?: FDBWhere,
    limit?: Number,
    offset?: Number,
    order?: FDBOrderBy,
    group?: FDBGrouopBy,
  }, 
  context?: Object 
}

FDB Attribute

declare type FDBAttribute = FDBColumn | FDBFunction | FDBValue | FDBSubQuery | string

FDB Function

declare type FDBFunction = { 
    func: string, 
    args: any[], 
    alias?: string 
}

FDB Column

declare type FDBColumn = { 
  column: string | FDBFunction, 
  alias?: string 
} | string

FDB Value

declare type FDBValue = { 
  value: string | number, 
  alias?: string 
}

FDB SubQuery

declare type FDBSubQuery = { 
  select: FDBPayload 
}

FDB Operator

declare type FDBOperator = string

FDB Where Clause

declare type FDBWhere = { 
  operator: string, 
  args: Array<FDBWhere | FDBWhereArgs> 
}

FDB Where Arguments

declare type FDBWhereArgs = Array<FDBWhereAttribute, FDBWhereLogic>

FDB Where Attribute

declare type FDBWhereAttribute = FDBColumn | FDBFunction

FDB Where logic

declare type FDBWhereLogic = FDBColumn | FDBFunction | Number | string

FDB Order By Clause

declare type FDBOrderBy = FDBColumn | Number | { 
  column: FDBColumn | Number, 
  direction?: FDBOrderDirection 
}

FDB Order Direction

declare type FDBOrderDirection = 'ASC' | 'DESC'

FDB Group By Clause

declare type FDBGroupBy = FDBColumn | FDBFunction | string

FDB Logic

declare type FDBLogic = FDBFunction | FDBWhere | FDBSubQuery | boolean

Go to the next chapter to know more about Attributes.




results matching ""

    No results matching ""