AlierTable: join()

対象のテーブルを与えられたテーブルと結合します。

構文

alierTable.join({ table }) => VirtualAlierTable
alierTable.join({ table, joinType }) => VirtualAlierTable
alierTable.join({ table, on }) => VirtualAlierTable
alierTable.join({ table, using }) => VirtualAlierTable
alierTable.join({ table, columns }) => VirtualAlierTable
alierTable.join({ table, columns, on }) => VirtualAlierTable
alierTable.join({ table, columns, using }) => VirtualAlierTable
alierTable.join({ table, joinType, on }) => VirtualAlierTable
alierTable.join({ table, joinType, using }) => VirtualAlierTable
alierTable.join({ table, joinType, columns }) => VirtualAlierTable
alierTable.join({ table, joinType, columns, on }) => VirtualAlierTable
alierTable.join({ table, joinType, columns, using }) => VirtualAlierTable

引数

単一の、以下のプロパティを持つオブジェクトを引数にとります。

返値: VirtualAlierTable

結合結果の VirtualAlierTable が返ります。

例外

  • DBError
  • TypeError
    • 引数のプロパティonnull または undefined でない値が設定されていて、それが文字列でない場合
    • 引数のプロパティ usingnull または undefined でない値が設定されていて、それが文字列の配列でない場合

解説

対象のテーブルを与えられたテーブルと結合します。

結合する AlierTable がプロパティ columns としてカラムのリストを持つ場合、それは無視されます。

結合する AlierTable がプロパティ alias としてテーブルの別名を持つ場合、結合テーブルから得られる AlierTable.get() の結果のレコードでは、カラム名として文字列 別名 + "_" + カラム名 が使われます。 別名がない場合、テーブル名 + "_" + カラム名 が代わりに使われます。