Options
All
  • Public
  • Public/Protected
  • All
Menu

PostgreSQL JSON or JSONB type

Hierarchy

  • PGJson

Index

Properties

data

data: any

The actual JSON object

Protected dummy

dummy: PGJson

Methods

Static arrayElem

  • arrayElem<s>(lhs: Col<s, PGJson>, rhs: Col<s, number>): Col<s, PGJson | null>
  • Get JSON array element (indexed from zero, negative integers count from the end)

    This is the PostgreSQL -> operator

    Type parameters

    • s

    Parameters

    • lhs: Col<s, PGJson>
    • rhs: Col<s, number>

    Returns Col<s, PGJson | null>

Static arrayElemAsText

  • arrayElemAsText<s>(lhs: Col<s, PGJson>, rhs: Col<s, number>): Col<s, string | null>
  • Get JSON array element as text (indexed from zero, negative integers count from the end)

    This is the PostgreSQL ->> operator

    Type parameters

    • s

    Parameters

    • lhs: Col<s, PGJson>
    • rhs: Col<s, number>

    Returns Col<s, string | null>

Static buildObject

  • Type parameters

    • s

    Parameters

    Returns Col<s, PGJson>

Static col

  • col<s>(json: any): Col<s, PGJson>
  • Type parameters

    • s

    Parameters

    • json: any

    Returns Col<s, PGJson>

Static objField

  • objField<s>(lhs: Col<s, PGJson>, rhs: Col<s, string>): Col<s, PGJson | null>
  • Get JSON object field by key

    This is the PostgreSQL -> operator

    Type parameters

    • s

    Parameters

    • lhs: Col<s, PGJson>
    • rhs: Col<s, string>

    Returns Col<s, PGJson | null>

Static objFieldAsText

  • objFieldAsText<s>(lhs: Col<s, PGJson>, rhs: Col<s, string>): Col<s, string | null>
  • Get JSON object field as text

    This is the PostgreSQL ->> operator

    Type parameters

    • s

    Parameters

    • lhs: Col<s, PGJson>
    • rhs: Col<s, string>

    Returns Col<s, string | null>

Static parser

  • Parameters

    • val: string

    Returns PGJson

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc