org.firebirdsql.jdbc
Class FBEscapedFunctionHelper

java.lang.Object
  extended byorg.firebirdsql.jdbc.FBEscapedFunctionHelper

public class FBEscapedFunctionHelper
extends java.lang.Object

Helper class for escaped functions.

Author:
Roman Rokytskyy

Constructor Summary
FBEscapedFunctionHelper()
           
 
Method Summary
static java.lang.String convertTemplate(java.lang.String functionCall)
          Convert escaped function call using function template.
static java.util.List parseArguments(java.lang.String functionCall)
          Extract function arguments from the function call.
static java.lang.String parseFunction(java.lang.String functionCall)
          Extract function name from the function call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FBEscapedFunctionHelper

public FBEscapedFunctionHelper()
Method Detail

parseFunction

public static java.lang.String parseFunction(java.lang.String functionCall)
                                      throws FBSQLParseException
Extract function name from the function call.

Parameters:
functionCall - escaped function call.
Returns:
name of the function.
Throws:
FBSQLParseException - if parse error occurs.

parseArguments

public static java.util.List parseArguments(java.lang.String functionCall)
                                     throws FBSQLParseException
Extract function arguments from the function call. This method parses escaped function call string and extracts function parameters from it.

Parameters:
functionCall - escaped function call.
Returns:
list of parameters of the function.
Throws:
FBSQLParseException - if parse error occurs.

convertTemplate

public static java.lang.String convertTemplate(java.lang.String functionCall)
                                        throws FBSQLParseException
Convert escaped function call using function template.

Parameters:
functionCall - escaped function call.
Returns:
server-side representation of the function call or null if no template found.
Throws:
FBSQLParseException - if escaped function call has incorrect syntax.


Copyright © 2001 David Jencks and other authors. All rights reserved.