Options
All
  • Public
  • Public/Protected
  • All
Menu

formn

Index

Classes

Interfaces

Type aliases

Functions

Type aliases

CardinalityType

CardinalityType: "OneToOne" | "OneToMany" | "ManyToOne"

Describes how two Table-decorated entities are related.

ConnectionStateType

ConnectionStateType: "DISCONNECTED" | "CONNECTING" | "CONNECTED"

The state of a ConnectionManager's connection.

EntityType

EntityType<T>: object

Type definition for Entity (Table-decorated class with type safety).

Type parameters

  • T

Type declaration

InsertResultType

InsertResultType: object

Result type for inserts, which generally has at least an insertId.

Type declaration

JoinType

JoinType: "INNER JOIN" | "LEFT OUTER JOIN"

Describes how two tables join to each other.

KeyValType

KeyValType: object

Simple key-value pair type.

Type declaration

  • [key: string]: any

MutateResultType

MutateResultType: object

Result type for update and delete queries, which has at least the number of affected rows.

Type declaration

OrderByType

OrderByType: object

Object describing how to order a select query.

Type declaration

OrderDirectionType

OrderDirectionType: "ASC" | "DESC"

Order direction, ascending or descinding.

ParameterType

ParameterType: object

Simple key-value pairs that are intended to replace parameters in a query condition.

Type declaration

  • [key: string]: any

PropertyMapType

PropertyMapType: object

See ColumnStore. This is an object that has all the properties of a Table-decorated class. Each property maps to the name of the property on the class. E.g. {id: 'id', name: 'name'}.

Type declaration

  • [key: string]: string

SelectResultType

SelectResultType: object[]

Result type for select queries, which is an array of key-value pairs. Each key corresponds to a column in the select.

TableType

TableType: object

Type definition for the type (constructor) of a Table-decorated class.

Type declaration

TransactionStateType

TransactionStateType: "READY" | "STARTING" | "STARTED" | "COMMITTING" | "COMMITTED" | "ROLLING_BACK" | "ROLLED_BACK"

The state of a transaction.

UpdateType

UpdateType: object

Key-value pairs used for updating. Each key should be a fully-qualified property.

Type declaration

  • [key: string]: any

Functions

Column

ManyToOne

  • ManyToOne<ENT_T, REF_ENT_T>(to: function, on: function): (Anonymous function)
  • Wrapper for Relationship with a hard-coded cardinality.

    Type parameters

    • ENT_T

    • REF_ENT_T

    Parameters

    • to: function
        • (): object
        • Returns object

    • on: function
        • (ent: ENT_T, refEnt: REF_ENT_T): string[] | any[]
        • Parameters

          • ent: ENT_T
          • refEnt: REF_ENT_T

          Returns string[] | any[]

    Returns (Anonymous function)

OneToMany

  • OneToMany<ENT_T, REF_ENT_T>(to: function, on: function): (Anonymous function)
  • Wrapper for Relationship with a hard-coded cardinality.

    Type parameters

    • ENT_T

    • REF_ENT_T

    Parameters

    • to: function
        • (): object
        • Returns object

    • on: function
        • (ent: ENT_T, refEnt: REF_ENT_T): string[] | any[]
        • Parameters

          • ent: ENT_T
          • refEnt: REF_ENT_T

          Returns string[] | any[]

    Returns (Anonymous function)

OneToOne

  • OneToOne<ENT_T, REF_ENT_T>(to: function, on: function): (Anonymous function)
  • Wrapper for Relationship with a hard-coded cardinality.

    Type parameters

    • ENT_T

    • REF_ENT_T

    Parameters

    • to: function
        • (): object
        • Returns object

    • on: function
        • (ent: ENT_T, refEnt: REF_ENT_T): string[] | any[]
        • Parameters

          • ent: ENT_T
          • refEnt: REF_ENT_T

          Returns string[] | any[]

    Returns (Anonymous function)

Relationship

Table

  • Decorator that is applied to a class to make it ORM capable. That is, it registers the class with formn so that it can be mapped to and from a database table. The decorator registers the class's TableMetadata in the TableStore.

    Parameters

    Returns (Anonymous function)

assert

  • assert(condition: any, message: string): void
  • Function that throws an Error(message) if condition is falsy.

    Parameters

    • condition: any

      The condition, which is checked if falsy (!condition).

    • message: string

      The message wich is thrown in an Error if * condition is falsy.

    Returns void

Generated using TypeDoc