org.mmbase.storage.search.implementation.database
Class InformixSqlHandler

java.lang.Object
  extended by org.mmbase.storage.search.implementation.database.BasicSqlHandler
      extended by org.mmbase.storage.search.implementation.database.InformixSqlHandler
All Implemented Interfaces:
SqlHandler

public class InformixSqlHandler
extends BasicSqlHandler
implements SqlHandler

The Informix query handler, implements SqlHandler for standard Informix functionality.
Derived from BasicSqlHandler, overrides

Since:
MMBase-1.7
Version:
$Id: InformixSqlHandler.java 34900 2009-05-01 16:29:42Z michiel $
Author:
Rob van Maris

Field Summary
static String ADD_ORDERED
           
 
Constructor Summary
InformixSqlHandler()
          Constructor.
 
Method Summary
 void appendQueryBodyToSql(StringBuilder sb, SearchQuery query, SqlHandler firstInChain)
          Represents body of a SearchQuery object as a string in SQL format, using the database configuration.
protected  void closeConnection(Connection con, Statement stmt)
          Safely close a database connection and/or a database statement.
 int getSupportLevel(int feature, SearchQuery query)
          Gets the level at which a feature is supported for a query by this handler.
 String toSql(SearchQuery query, SqlHandler firstInChain)
          Represents a SearchQuery object as a string in SQL format, using the database configuration.
 
Methods inherited from class org.mmbase.storage.search.implementation.database.BasicSqlHandler
appendCompositeConstraintToSql, appendConstraintToSql, appendDateField, appendDateValue, appendField, appendField, appendField, appendFieldValue, appendLikeOperator, appendLowerField, appendPreField, appendRegularExpressionOperator, appendRelationConstraints, appendSortOrderDirection, appendSortOrderField, appendSortOrderField, appendSortOrders, appendTableAlias, appendTableName, forceEncode, getAllowedValue, getSupportLevel, toSqlString, useLower
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.storage.search.implementation.database.SqlHandler
appendConstraintToSql, getAllowedValue, getSupportLevel
 

Field Detail

ADD_ORDERED

public static final String ADD_ORDERED
See Also:
Constant Field Values
Constructor Detail

InformixSqlHandler

public InformixSqlHandler()
Constructor.

Method Detail

getSupportLevel

public int getSupportLevel(int feature,
                           SearchQuery query)
                    throws SearchQueryException
Description copied from interface: SqlHandler
Gets the level at which a feature is supported for a query by this handler. This is one of either: Given the choice, the query handler with the highest level of support is prefered.

Specified by:
getSupportLevel in interface SqlHandler
Overrides:
getSupportLevel in class BasicSqlHandler
Throws:
SearchQueryException

toSql

public String toSql(SearchQuery query,
                    SqlHandler firstInChain)
             throws SearchQueryException
Description copied from interface: SqlHandler
Represents a SearchQuery object as a string in SQL format, using the database configuration.

Specified by:
toSql in interface SqlHandler
Overrides:
toSql in class BasicSqlHandler
Parameters:
query - The searchquery.
firstInChain - The first element in the chain of handlers. At some point appendQueryBodyToSql() will have to be called on this handler, to generate the body of the query.
Returns:
SQL string representation of the query.
Throws:
SearchQueryException

appendQueryBodyToSql

public void appendQueryBodyToSql(StringBuilder sb,
                                 SearchQuery query,
                                 SqlHandler firstInChain)
                          throws SearchQueryException
Description copied from interface: SqlHandler
Represents body of a SearchQuery object as a string in SQL format, using the database configuration. Appends this to a stringbuffer.
The body of the SQL query string is defined as the substring containing fields, tables, constraints and orders.

Specified by:
appendQueryBodyToSql in interface SqlHandler
Overrides:
appendQueryBodyToSql in class BasicSqlHandler
Parameters:
sb - The stringbuffer to append to.
query - The searchquery.
firstInChain - The first element in the chain of handlers. At some point appendConstraintToSql() will have to be called on this handler, to generate the constraints in the query.
Throws:
SearchQueryException

closeConnection

protected void closeConnection(Connection con,
                               Statement stmt)
Safely close a database connection and/or a database statement.

Parameters:
con - The connection to close. Can be null.
stmt - The statement to close, prior to closing the connection. Can be null.


MMBase 2.0-SNAPSHOT - null