Пример #1
0
 private void ReplaceWithCountFunc(SelectStmt stmt)
 {
     if (stmt.Query.Type == QueryType.Compound)
     {
         // メインクエリが複合クエリの場合はSELECT COUNT(*)文でラッピングする
         // (複合クエリのOrderBy句は変換処理なしにSELECT COUNT(*)のOrderByに使える)
         var singleQueryClause = SingleQuery.WrapInSelectStar(new AliasedQuery((IQueryClause)stmt.Query, false, "COUNT_"));
         // Limit句にはColumnを指定できないので変換処理は必要ない
         var singleQuery = new SingleQuery(singleQueryClause, stmt.Query.OrderBy, stmt.Query.Limit);
         stmt.Query = singleQuery;
     }
     this.ReplaceWithCountFunc((IQueryClause)stmt.Query);
 }
Пример #2
0
 virtual public void VisitAfter(SelectStmt selectStmt)
 {
 }
Пример #3
0
 // Statements
 virtual public void VisitBefore(SelectStmt selectStmt)
 {
 }
Пример #4
0
 public void VisitAfter(SelectStmt selectStmt)
 {
     _visitor.VisitAfter(selectStmt);
 }
Пример #5
0
 // Statements
 public void VisitBefore(SelectStmt selectStmt)
 {
     _visitor.VisitBefore(selectStmt);
 }