internal CountQueryResultInfo(string tableAliasName , string columnAliasName , KeyType keyType , bool explicitDecl , bool isComplemented , SqlTable sourceTable , string SourceColumnName , ResultColumn node , ResultInfoList sourceInfoList , int sourceInfoListIndex) { this.TableAliasName = tableAliasName; this.ColumnAliasName = columnAliasName; this.KeyType = keyType; this.ExplicitDecl = explicitDecl; this.IsComplemented = isComplemented; this.SourceTable = sourceTable; this.SourceColumnName = SourceColumnName; this.Node = node; this.SourceInfoList = sourceInfoList; this.SourceInfoListIndex = sourceInfoListIndex; if (sourceInfoList != null && sourceInfoListIndex >= 0) { this.SourceInfo = sourceInfoList[sourceInfoListIndex]; } }
private void InsertResult(SingleQueryClause query, int index, ResultColumn result) { // SELECT句が'*'かつFrom句が存在する場合、Table.*に置き換える if (query.HasWildcard) { if (!query.HasFrom) { throw new InvalidASTStructureError( "'*'が参照するFROM句が存在しないため、SELECT句を追加できません"); } query.HasWildcard = false; // From句で参照する抽出元の別名を取得する var tableWildcards = new List <TableWildcard>(); foreach (var table in this.GetAliasNamesFromSource(query.From)) { if (!string.IsNullOrEmpty(table.AliasName)) { tableWildcards.Add(new TableWildcard(table.AliasName)); } else { tableWildcards.Add(new TableWildcard(table.ServerName , table.DataBaseName , table.SchemaName , table.Name)); } } query.Results.Clear(); query.Results.AddRange(tableWildcards); } // 指定されたSelect句を追加する query.Results.Insert(index, result); }
public InsertResultVisitor(int index , string exprStr , Identifier aliasName , DBMSType dbmsType = DBMSType.Unknown , bool forSqlAccessor = false) { _index = index; var expr = MiniSqlParserAST.CreateExpr(exprStr, dbmsType, forSqlAccessor); _result = new ResultExpr(expr, true, aliasName); }
internal CountQueryResultInfo(string tableAliasName , string columnAliasName , KeyType keyType , bool explicitDecl , bool isComplemented , ResultColumn node) : this(tableAliasName , columnAliasName , keyType , explicitDecl , isComplemented , null , null , node , null , -1) { }
public ResultInfo(string tableAliasName , string columnAliasName , ResultColumn node , ResultInfo sourceInfo = null) { this.TableAliasName = tableAliasName; this.ColumnAliasName = columnAliasName; this.Node = node; if (sourceInfo == null) { this.Sources = new List <TableAndColumn>(); } else { this.SourceInfo = sourceInfo; this.Sources = sourceInfo.Sources; } }
public InsertResultVisitor(int index, ResultColumn result) { _index = index; _result = result; }