org.hsqldb
Class FunctionCustom
- java.lang.Object
-
- org.hsqldb.Expression
-
- org.hsqldb.FunctionSQL
-
- org.hsqldb.FunctionCustom
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class FunctionCustom extends FunctionSQL
Implementation of HSQLDB functions that are not defined by the SQL standard.Some functions are translated into equivalent SQL Standard functions.
- Since:
- 1.9.0
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String[]openGroupDateTimeFunctionsstatic java.lang.String[]openGroupNumericFunctionsstatic java.lang.String[]openGroupStringFunctionsstatic java.lang.String[]openGroupSystemFunctions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description ExpressiongetFunctionExpression()java.lang.StringgetSQL()For use with CHECK constraints.static booleanisRegularFunction(int tokenType)static booleanisValueFunction(int tokenType)static FunctionSQLnewCustomFunction(java.lang.String token, int tokenType)voidresolveTypes(Session session, Expression parent)voidsetArguments(Expression[] nodes)static char[]soundex(java.lang.String s)Returns a four character code representing the sound of the givenString.-
Methods inherited from class org.hsqldb.FunctionSQL
describe, equals, getValue, hashCode, isDeterministic, isValueFunction, newSQLFunction
-
Methods inherited from class org.hsqldb.Expression
checkValidCheckConstraint, duplicate, equals, getAggregatedValue, getColumn, getCondition, getConstantValueNoCheck, getResult, getRowValue, getSubqueries, getTable, getType, getUnkeyedColumns, hasCondition, isCorrelated, isFalse, isIndexable, isTrue, materialise, resolveCheckOrGenExpression, resolveColumnReferences, resolveColumnReferences, setCollation, setCondition, testCondition, updateAggregatingValue
-
-
-
-
Field Detail
-
openGroupNumericFunctions
public static final java.lang.String[] openGroupNumericFunctions
-
openGroupStringFunctions
public static final java.lang.String[] openGroupStringFunctions
-
openGroupDateTimeFunctions
public static final java.lang.String[] openGroupDateTimeFunctions
-
openGroupSystemFunctions
public static final java.lang.String[] openGroupSystemFunctions
-
-
Method Detail
-
newCustomFunction
public static FunctionSQL newCustomFunction(java.lang.String token, int tokenType)
-
isRegularFunction
public static boolean isRegularFunction(int tokenType)
-
isValueFunction
public static boolean isValueFunction(int tokenType)
-
setArguments
public void setArguments(Expression[] nodes)
- Overrides:
setArgumentsin classFunctionSQL
-
getFunctionExpression
public Expression getFunctionExpression()
- Overrides:
getFunctionExpressionin classFunctionSQL
-
resolveTypes
public void resolveTypes(Session session, Expression parent)
- Overrides:
resolveTypesin classFunctionSQL
-
getSQL
public java.lang.String getSQL()
Description copied from class:ExpressionFor use with CHECK constraints. Under development. Currently supports a subset of expressions and is suitable for CHECK search conditions that refer only to the inserted/updated row. For full DDL reporting of VIEW select queries and CHECK search conditions, future improvements here are dependent upon improvements to SELECT query parsing, so that it is performed in a number of passes. An early pass should result in the query turned into an Expression tree that contains the information in the original SQL without any alterations, and with tables and columns all resolved. This Expression can then be preserved for future use. Table and column names that are not user-defined aliases should be kept as the HsqlName structures so that table or column renaming is reflected in the precompiled query.- Overrides:
getSQLin classFunctionSQL
-
soundex
public static char[] soundex(java.lang.String s)
Returns a four character code representing the sound of the givenString. Non-ASCCI characters in the inputStringare ignored.This method was rewritten for HSQLDB to comply with the description at http://www.archives.gov/research/census/soundex.html .
- Parameters:
s- theStringfor which to calculate the 4 characterSOUNDEXvalue- Returns:
- the 4 character
SOUNDEXvalue for the givenString
-
-
DataMelt 3.0 © DataMelt by jWork.ORG