Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MySQLFromAdapter<T>

A specialized FromAdapter for MySQL databases. See FromAdapter.

Type parameters

  • T

Hierarchy

Index

Constructors

constructor

Properties

Protected colStore

colStore: ColumnStore

Used for accessing columns in tables.

Protected escaper

escaper: MySQLEscaper

An Escaper for MySQL. Used when escaping column names.

Protected executer

executer: MySQLExecuter

An Executer instance for MySQL.

Protected propStore

propStore: PropertyMapStore

Used for pulling table property maps (used in conjunction with the relStore to get remote columns).

Protected relStore

Used for accessing relationships between tables.

Protected tblStore

tblStore: TableStore

Used for accessing tables in the database.

Methods

count

  • count(col?: string): Count

delete

  • delete(alias?: string): Delete
  • Delete from a table. See Delete.

    Parameters

    • Optional alias: string

      The unique alias of the table from which records will be deleted. Optional, defaults to the alias of the from table.

    Returns Delete

    A Delete instance that can be executed.

getBaseTableMeta

getFromMeta

getFromString

  • getFromString(): string
  • Get the FROM portion of the query as a string.

    Returns string

    The FROM portion of the query (FROM <table> AS <alias>), escaped.

getJoinMeta

  • Helper method to get the meta data of the JOIN'd in tables.

    Returns FromTableMeta[]

    An array of meta objects describing each table. The meta objects are in insertion order (e.g. in the order the tables were joined in).

getJoinString

  • getJoinString(): string

getParameterList

getWhereString

  • getWhereString(): string
  • Get the WHERE portion of the query string.

    Returns string

    The WHERE part of the query, or a blank string if there is no where clause.

innerJoin

join

  • Join in a table.

    Type parameters

    • J

    Parameters

    Returns this

  • Join in a table.

    Type parameters

    • J

    Parameters

    • joinType: JoinType

      How to join the two tables (INNER JOIN, LEFT OUTER JOIN).

    • Entity: TableType

      The Table-decorated Entity to join in.

    • alias: string

      Alias of the joined-in table.

    • fqParentProperty: string

      The fully-qualified property name on the parent Entity to which this Entity will be mapped.

    • Optional joinCond: object

      An optional condition that describes how to join the two tables. If not supplied then the join condition will be derived.

    • Optional joinParams: ParameterType

      An optional set of parameters that will be used to replace values in joinCond.

    Returns this

leftOuterJoin

select

toString

  • toString(): string

update

where

Generated using TypeDoc