public JoinedTableOn(Column parentTableColumn, ForeignColumn joinedTableColumn, IAliasable parentTableAlias, IAliasable joinedTableAlias, SqlType sqlType) { parentTableColumn.CheckWhetherArgumentIsNull("parentTableColumn"); joinedTableColumn.CheckWhetherArgumentIsNull("joinedTableColumn"); parentTableAlias.CheckWhetherArgumentIsNull("parentTableAlias"); joinedTableAlias.CheckWhetherArgumentIsNull("joinedTableAlias"); this.parentTableColumn = parentTableColumn; this.joinedTableColumn = joinedTableColumn; this.parentTableAlias = parentTableAlias; this.joinedTableAlias = joinedTableAlias; this.formatModel = sqlType.BuildFormatSystemModel(); // set aliases joinedTableColumn.SetTableAlias(this.joinedTableAlias.Alias); }
public JoinedTable( string schema, string table, string alias, IAliasable parentTable, Column parentTableColumn, ForeignColumn childTableColumn, JoinType joinType = JoinType.LeftOuter, SqlType sqlType = SqlType.SqlServer) : base(schema, table, alias) { this.joinedTableOn = new JoinedTableOn(parentTableColumn, childTableColumn, parentTable, this, sqlType); this.formatModel = sqlType.BuildFormatSystemModel(); if (!JoinTypeMap.ContainsKey(joinType)) { throw new InvalidOperationException("Must contain a valid join type"); } this.joinType = JoinTypeMap[joinType]; }