static public bool IsSynonymFor(IAliasable oAliasable, string sAlias) { if (sAlias.Equals(oAliasable.Name, StringComparison.CurrentCultureIgnoreCase)) { return(true); } foreach (string sA in oAliasable.Aliases) { if (sAlias.Equals(sA, StringComparison.CurrentCultureIgnoreCase)) { return(true); } } return(false); }
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]; }
static public bool IsSynonymFor(string sAlias, IAliasable oAliasable) { return(IsSynonymFor(oAliasable, sAlias)); }
protected Column(string field, IAliasable table, SqlType sqlType) : this(field, sqlType) { table.CheckWhetherArgumentIsNull("table"); this.TableAlias = table.Alias; }
public NormalColumn(string field, IAliasable table, SqlType sqlType = SqlType.SqlServer) : base(field, table, sqlType) { }