@@ -2053,7 +2053,7 @@ typedef struct InsertStmt
2053
2053
OverridingKind override ; /* OVERRIDING clause */
2054
2054
Node * execStmt ; /* for INSERT ... EXECUTE */
2055
2055
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 */
2057
2057
} InsertStmt ;
2058
2058
2059
2059
/* ----------------------
@@ -2069,7 +2069,7 @@ typedef struct DeleteStmt
2069
2069
List * returningList ; /* list of expressions to return */
2070
2070
WithClause * withClause ; /* WITH clause */
2071
2071
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 */
2073
2073
} DeleteStmt ;
2074
2074
2075
2075
/* ----------------------
@@ -2086,7 +2086,7 @@ typedef struct UpdateStmt
2086
2086
List * returningList ; /* list of expressions to return */
2087
2087
WithClause * withClause ; /* WITH clause */
2088
2088
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 */
2090
2090
} UpdateStmt ;
2091
2091
2092
2092
/* ----------------------
@@ -2181,24 +2181,9 @@ typedef struct SelectStmt
2181
2181
ColumnRef * pivotCol ;
2182
2182
Node * aggFunc ;
2183
2183
2184
- /* These field is used only with tsql_top clause - top N [PERCENT][WITH TIES]*/
2185
- bool isPercent ;
2186
2184
} SelectStmt ;
2187
2185
2188
2186
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
-
2202
2187
2203
2188
/* ----------------------
2204
2189
* Set Operation node for post-analysis query trees
0 commit comments