@@ -2053,7 +2053,7 @@ typedef struct InsertStmt
20532053 OverridingKind override ; /* OVERRIDING clause */
20542054 Node * execStmt ; /* for INSERT ... EXECUTE */
20552055 Node * limitCount ; /* used by INSERT TOP in T-SQL*/
2056- bool isPercent ; /* Used with INSERT TOP N PERCENT in T-SQL */
2056+ LimitOption limitOption ; /* limit type */
20572057} InsertStmt ;
20582058
20592059/* ----------------------
@@ -2069,7 +2069,7 @@ typedef struct DeleteStmt
20692069 List * returningList ; /* list of expressions to return */
20702070 WithClause * withClause ; /* WITH clause */
20712071 Node * limitCount ; /* used with DELETE TOP in T-SQL */
2072- bool isPercent ; /* Used with DELETE TOP N PERCENT in T-SQL */
2072+ LimitOption limitOption ; /* limit type */
20732073} DeleteStmt ;
20742074
20752075/* ----------------------
@@ -2086,7 +2086,7 @@ typedef struct UpdateStmt
20862086 List * returningList ; /* list of expressions to return */
20872087 WithClause * withClause ; /* WITH clause */
20882088 Node * limitCount ; /* used with UPDATE TOP in T-SQL */
2089- bool isPercent ; /* Used with UPDATE TOP N PERCENT in T-SQL */
2089+ LimitOption limitOption ; /* limit type */
20902090} UpdateStmt ;
20912091
20922092/* ----------------------
@@ -2181,24 +2181,9 @@ typedef struct SelectStmt
21812181 ColumnRef * pivotCol ;
21822182 Node * aggFunc ;
21832183
2184- /* These field is used only with tsql_top clause - top N [PERCENT][WITH TIES]*/
2185- bool isPercent ;
21862184} SelectStmt ;
21872185
21882186
2189- /*
2190- * This node is used in gram-tsql-rule.y to store limitCount and Percent op information.
2191- * Furthuremore, through this node, we are updating limitCount and isPercent( Added for supporing tsql Percent Op) fields
2192- * in SelectStmt, UpdateStmt, DeleteStmt, InsertStmt
2193- */
2194- typedef struct TopClause
2195- {
2196- NodeTag type ; /* type tag */
2197- Node * limitCount ; /* expression for the limit count/percent */
2198- bool isPercent ; /* true if PERCENT specified */
2199- } TopClause ;
2200-
2201-
22022187
22032188/* ----------------------
22042189 * Set Operation node for post-analysis query trees
0 commit comments