1 package com.daffodilwoods.daffodildb.server.sql99.dql.execution; 2 3 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator.*; 4 import com.daffodilwoods.daffodildb.utils.field.*; 5 import com.daffodilwoods.database.resource.*; 6 import com.daffodilwoods.daffodildb.server.sql99.expression.valueexpression; 7 8 19 public class AggregateCountAsterisk implements _Aggregate { 20 21 24 private long count = 0; 25 26 public AggregateCountAsterisk() throws DException { 27 } 28 29 33 public void initialize() throws DException { 34 count = 0; 35 } 36 37 43 public Object getResult() throws DException { 44 return new FieldLiteral(new Long (count), com.daffodilwoods.daffodildb.server.sql99.common.Datatypes.LONG); 45 } 46 47 public void releaseResource() throws DException { 48 } 49 50 public valueexpression getValueExpression() { 51 return null; 52 } 53 54 59 60 public void addRecord(Object newObject) throws DException{ 61 count++; 62 } 63 64 } 65 | Popular Tags |