/// <summary>Agrega una tabla al listado de tablas a unir</summary> public Query Join(dbJoi joinType, string tableAlias, string table, string schema, string database) { Table tbl = new Table(SanitizeSQL(table)); tbl.tableAlias = SanitizeSQL(tableAlias); tbl.schema = SanitizeSQL(schema); tbl.database = SanitizeSQL(database); curUnion.lstFrom.Add(tbl); if (curUnion.lstJoin.Any(j => j.tableAlias == tableAlias)) { throw new Exception("Ya existe el alias " + SanitizeSQL(tableAlias) + " en la consulta"); } curUnion.lstJoin.Add(new JoinTable() { tableAlias = SanitizeSQL(tableAlias), type = joinType }); return(this); }
/// <summary>Agrega una tabla al listado de tablas a unir</summary> public Query Join(dbJoi joinType, string tableAlias, string table) { return(Join(joinType, tableAlias, table, "", "")); }