Class SqlText

java.lang.Object
com.randomnoun.common.jexl.sql.SqlText

public class SqlText extends Object
Class to mark a String as generated 'SQL' (as opposed to a String literal).

As the SqlGenerator traverses nodes in the AST graph, the visit() methods return values which are either POJOs (Integers, Strings, Longs, etc...) which are evaluated from the AST, or SQL text, which is basically an opaque string which is generated from what we've seen so far in the AST; (e.g. "abc > 123 AND def LIKE 'GHI'"). As soon as a POJO is converted into it's SQL form, it is wrappered in this object, so that other visit() nodes don't accidentally try to evaluate it.

Author:
knoxg
  • Constructor Details

  • Method Details