org.eigenbase.sql.util
Class ListSqlOperatorTable

java.lang.Object
  extended by org.eigenbase.sql.util.ListSqlOperatorTable
All Implemented Interfaces:
SqlOperatorTable

public class ListSqlOperatorTable
extends Object
implements SqlOperatorTable

Implementation of the SqlOperatorTable interface by using a list of operators.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/util/ListSqlOperatorTable.java#7 $
Author:
jhyde

Field Summary
private  List<SqlOperator> operatorList
           
 
Constructor Summary
ListSqlOperatorTable()
           
 
Method Summary
 void add(SqlOperator op)
           
 List<SqlOperator> getOperatorList()
          Retrieves a list of all functions and operators in this table.
 List<SqlOperator> lookupOperatorOverloads(SqlIdentifier opName, SqlFunctionCategory category, SqlSyntax syntax)
          Retrieves a list of operators with a given name and syntax.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operatorList

private final List<SqlOperator> operatorList
Constructor Detail

ListSqlOperatorTable

public ListSqlOperatorTable()
Method Detail

add

public void add(SqlOperator op)

lookupOperatorOverloads

public List<SqlOperator> lookupOperatorOverloads(SqlIdentifier opName,
                                                 SqlFunctionCategory category,
                                                 SqlSyntax syntax)
Description copied from interface: SqlOperatorTable
Retrieves a list of operators with a given name and syntax. For example, by passing SqlSyntax.Function, the returned list is narrowed to only matching SqlFunction objects.

Specified by:
lookupOperatorOverloads in interface SqlOperatorTable
Parameters:
opName - name of operator
category - function category to look up, or null for any matching operator
syntax - syntax type of operator
Returns:
mutable list of SqlOperator objects (or immutable empty list if no matches)

getOperatorList

public List<SqlOperator> getOperatorList()
Description copied from interface: SqlOperatorTable
Retrieves a list of all functions and operators in this table. Used for automated testing.

Specified by:
getOperatorList in interface SqlOperatorTable
Returns:
list of SqlOperator objects