Returns whether it is the function COUNT( ). @return true if function call to COUNT( )
()
| 228 | * @return true if function call to COUNT(*) |
| 229 | */ |
| 230 | public boolean isCountStar() { |
| 231 | SqlOperator sqlOperator = getOperator(); |
| 232 | if (sqlOperator.getName().equals("COUNT") |
| 233 | && operandCount() == 1) { |
| 234 | final SqlNode parm = operand(0); |
| 235 | if (parm instanceof SqlIdentifier) { |
| 236 | SqlIdentifier id = (SqlIdentifier) parm; |
| 237 | if (id.isStar() && id.names.size() == 1) { |
| 238 | return true; |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | return false; |
| 244 | } |
| 245 | |
| 246 | @Pure |
| 247 | public @Nullable SqlLiteral getFunctionQuantifier() { |