@@ -2051,7 +2051,7 @@ typedef struct InsertStmt
20512051 OverridingKind override ; /* OVERRIDING clause */
20522052 Node * execStmt ; /* for INSERT ... EXECUTE */
20532053 Node * limitCount ; /* used by INSERT TOP in T-SQL*/
2054- bool isPercent ; /* Used with INSERT TOP N PERCENT in T-SQL */
2054+ LimitOption limitOption ; /* limit type */
20552055} InsertStmt ;
20562056
20572057/* ----------------------
@@ -2067,7 +2067,7 @@ typedef struct DeleteStmt
20672067 List * returningList ; /* list of expressions to return */
20682068 WithClause * withClause ; /* WITH clause */
20692069 Node * limitCount ; /* used with DELETE TOP in T-SQL */
2070- bool isPercent ; /* Used with DELETE TOP N PERCENT in T-SQL */
2070+ LimitOption limitOption ; /* limit type */
20712071} DeleteStmt ;
20722072
20732073/* ----------------------
@@ -2084,7 +2084,7 @@ typedef struct UpdateStmt
20842084 List * returningList ; /* list of expressions to return */
20852085 WithClause * withClause ; /* WITH clause */
20862086 Node * limitCount ; /* used with UPDATE TOP in T-SQL */
2087- bool isPercent ; /* Used with UPDATE TOP N PERCENT in T-SQL */
2087+ LimitOption limitOption ; /* limit type */
20882088} UpdateStmt ;
20892089
20902090/* ----------------------
@@ -2179,24 +2179,9 @@ typedef struct SelectStmt
21792179 ColumnRef * pivotCol ;
21802180 Node * aggFunc ;
21812181
2182- /* These field is used only with tsql_top clause - top N [PERCENT][WITH TIES]*/
2183- bool isPercent ;
21842182} SelectStmt ;
21852183
21862184
2187- /*
2188- * This node is used in gram-tsql-rule.y to store limitCount and Percent op information.
2189- * Furthuremore, through this node, we are updating limitCount and isPercent( Added for supporing tsql Percent Op) fields
2190- * in SelectStmt, UpdateStmt, DeleteStmt, InsertStmt
2191- */
2192- typedef struct TopClause
2193- {
2194- NodeTag type ; /* type tag */
2195- Node * limitCount ; /* expression for the limit count/percent */
2196- bool isPercent ; /* true if PERCENT specified */
2197- } TopClause ;
2198-
2199-
22002185
22012186/* ----------------------
22022187 * Set Operation node for post-analysis query trees
0 commit comments