public override void ParseAttributes() { var splitAttributes = Attributes.Split('|'); if (splitAttributes[0].Contains("SELECT_ALL")) { TableName = splitAttributes[0].Split('#')[1]; SelectAllFlag = true; } else { foreach (var attribute in splitAttributes) { if (attribute != "") { var newColumnConfig = new SelectRowInfo(attribute); SelectConfigList.Add(newColumnConfig); if (TableName == null) { TableName = newColumnConfig.TableName; } } } ParseSelectConfig(); } }
public override void ParseAttributes() { var splitAttributes = Attributes.Split('|'); var selectedTables = new List <string>(); foreach (var selectAttribute in splitAttributes[0].Split('*')) { if (selectAttribute != "") { SelectJoinInfo.Add(new SelectJoinInfo(selectAttribute)); var leftTable = selectAttribute.Split('#')[0]; var rightTable = selectAttribute.Split('#')[2]; if (!selectedTables.Contains(leftTable)) { selectedTables.Add(leftTable); } if (!selectedTables.Contains(rightTable)) { selectedTables.Add(rightTable); } } } for (int idx = 1; idx < splitAttributes.Length; idx++) { if (splitAttributes[idx] != "") { var newColumnConfig = new SelectRowInfo(splitAttributes[idx]); SelectConfigList.Add(newColumnConfig); } } ParseSelectConfig(); foreach (var table in selectedTables) { SelectedTablesStructure.Add(new Tuple <string, List <string> >(table, TableUtils.GetTableColumns(DatabaseName, table))); } }