public Table(string schema, string table, string alias, SqlType sqlType = SqlType.SqlServer) { this.SchemaName = schema; this.TableName = table; this.Alias = alias; this.formatModel = sqlType.BuildFormatSystemModel(); }
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]; }
protected Column(string field, SqlType sqlType) { this.Field = field; this.TableAlias = string.Empty; this.formatModel = sqlType.BuildFormatSystemModel(); }