Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Constraint

Type alias for something that can be either a single constraint or a group of them.

ConstraintConnectionOperator

ConstraintConnectionOperator: "AND" | "OR" | "AND NOT" | "OR NOT"

SQL operator that is used to join two constraint clauses.

ConstraintGroupClosure

ConstraintGroupClosure<T>: (group: AbstractBuilder<T>) => any

Type alias for a function that applies some constraints to a builder group.

Type parameters

  • T

Type declaration

ConstraintOperator

ConstraintOperator: "&" | ">" | ">=" | "<" | "<=" | "!=" | "<=>" | "%" | "|" | "!" | "~" | "=" | "^" | "IN" | "NOT IN" | "LIKE" | "BETWEEN" | "NOT BETWEEN" | "IS" | "IS NOT"

SQL operator that appears in a constraint clause.

EscapeValue

EscapeValue: null | undefined | string | number | boolean | Date | QuerySafeValue | EscapeValue[]

A value which can be escaped to be interpolated into an SQL query.

EscapeValueObject

EscapeValueObject: {}

Object mapping string field names to EscapeValue items.

Type declaration

ModelKey

ModelKey: string | number

A valid key on a model.

OrderDirection

OrderDirection: "ASC" | "DESC" | "asc" | "desc"

Possible SQL order-by clause directions.

OrderStatement

OrderStatement: { direction: OrderDirection; field: string }

Interface for storing the parts of a SQL order-by clause.

Type declaration

QueryRow

QueryRow: {}

A single query row, as an object.

Type declaration

  • [key: string]: any

QuerySource

QuerySource: string | { alias: string; table: string }

Type alias for an item that refers to a table in a database.

SpecifiedField

SpecifiedField: string | QuerySafeValue | { alias: string; field: string | QuerySafeValue }

Type alias for an item that refers to a field on a table.

Variables

Const EXTOLLO_ORM_MODEL_FIELDS_METADATA_KEY

EXTOLLO_ORM_MODEL_FIELDS_METADATA_KEY: "extollo:orm:Field.ts" = 'extollo:orm:Field.ts'

The reflection metadata key containing information about the model's fields.

Functions

Field

  • Field(type: FieldType, databaseKey?: string): PropertyDecorator
  • Decorator that maps the given property to a database column of the specified FieldType.

    example
    class MyModel extends Model<MyModel> {
        // Maps the 'name' VARCHAR column in the database to this property
        @Field(FieldType.Varchar)
        public name!: string
    
        // Maps the 'first_name' VARCHAR column in the database to this property
        @Field(FieldType.Varchar, 'first_name')
        public firstName!: string
    }
    

    Parameters

    • type: FieldType
    • Optional databaseKey: string

    Returns PropertyDecorator

getFieldsMeta

  • getFieldsMeta(model: any): Collection<ModelField>

isConstraintGroup

isConstraintItem

raw

setFieldsMeta

  • setFieldsMeta(model: any, fields: Collection<ModelField>): void
Extollo Logo

extollo (v. latin) - to lift up, to elevate

Extollo is a free & libre application framework in TypeScript.