org.apache.derby.impl.sql.compile
Class CountAggregateDefinition

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.CountAggregateDefinition
All Implemented Interfaces:
AggregateDefinition

public class CountAggregateDefinition
extends java.lang.Object
implements AggregateDefinition

Defintion for the COUNT()/COUNT(*) aggregates.

Author:
jamie

Constructor Summary
CountAggregateDefinition()
          Niladic constructor.
 
Method Summary
 TypeDescriptor getAggregator(TypeDescriptor inputType, java.lang.StringBuffer aggregatorClass)
          Determines the result datatype.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountAggregateDefinition

public CountAggregateDefinition()
Niladic constructor. Does nothing. For ease Of use, only.

Method Detail

getAggregator

public final TypeDescriptor getAggregator(TypeDescriptor inputType,
                                          java.lang.StringBuffer aggregatorClass)
Determines the result datatype. We can run count() on anything, and it always returns a INTEGER (java.lang.Integer).

Specified by:
getAggregator in interface AggregateDefinition
Parameters:
inputType - the input type descriptor
aggregatorClass - output parameter, filled in with the class name that implements com.ibm.db2j.aggregates.Aggregator
Returns:
the output Class (null if cannot operate on value expression of this type.
See Also:
TypeDescriptor, com.ibm.db2j.types.TypeFactory, com.ibm.db2j.aggregates.Aggregator


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.