Options
All
  • Public
  • Public/Protected
  • All
Menu

basie

Index

Type aliases

A

A: QueryBuilder<T> & function

Builder

Builder: QueryBuilder<any>

DatabaseType

DatabaseType: number | string | boolean

Represents the types currently supported natively.

JoinType

JoinType: "INNER" | "LEFT" | "RIGHT"

KeyedDatabaseResult

KeyedDatabaseResult: object

Type declaration

Operator

Operator: "=" | "<" | ">" | "<=" | ">=" | "<>" | "!=" | "<=>" | "LIKE" | "LIKE BINARY" | "NOT LIKE" | "BETWEEN" | "ILIKE" | "&" | "|" | "^" | "<<" | ">>" | "RLIKE" | "REGEXP" | "NOT REGEXP" | "~" | "~*" | "!~" | "!~*" | "SIMILAR TO" | "NOT SIMILAR TO" | "NOT ILIKE" | "~~*" | "!~~*"

OrderDirection

OrderDirection: "DESC" | "ASC"

QueryBoolean

QueryBoolean: "AND" | "OR"

QueryComponent

QueryComponent: object

Type declaration

R

R: QueryBuilder<T> & function

WhereQueryClause

Wrapped

Wrapped: T & object & QueryBuilder<A>

Functions

getForeignKey

  • getForeignKey(name: string): string
  • Returns the automatic foreign key name for the specified string. This trims an optional leading space, then converts the PascalCase to pascal_case and appends _id. Converts _LeaderboardCategory into leaderboard_category_id for example.

    Parameters

    • name: string

    Returns string

getPivotTableName

  • getPivotTableName(a: string, b: string): string
  • Returns the table name for a pivot table between the two specified tables. This takes the table names of the specified models, then sorts them alphabetically and joins them with an underscore.

    Parameters

    • a: string
    • b: string

    Returns string

getTableName

  • getTableName(name: string): string
  • Returns the pluralized table name for the specified string. This trims an optional leading space, then converts the PascalCase to pascal_case and pluralizes it. Converts _LeaderboardCategory into leaderboard_categories for example.

    Parameters

    • name: string

    Returns string

Generated using TypeDoc