Class ParametersParser

java.lang.Object
scriptella.jdbc.ParametersParser

public class ParametersParser extends Object
Parses parameter expressions in SQL statements. This class use Expression parsing mechanism except the file reference case.

The syntax of the file reference is the following:

?{file <Expression>}

The result of expression evaluation must be of String or URL type.

Examples:

  • ?{file 'http://site.com/img.gif')
  • ?{file 'file:/path/img.gif')
  • ?{file 'img.gif') - represents a reference relative to a directory where script file located.
Version:
1.0
Author:
Fyodor Kupolov
See Also:
  • Constructor Details

    • ParametersParser

      public ParametersParser(DriverContext driverContext)
      Creates a file reference parser.
      Parameters:
      driverContext - drivers content to use for URL resolution.
  • Method Details

    • evaluate

      public Object evaluate(String expression, ParametersCallback parameters)
      Parses specified expression and returns the result of evaluation.
      Parameters:
      expression - expression to parse.
      Returns:
      result of parse.