public interface ISQLQuerySyntax
Title: SQL Query Syntax
Description: Base interface which allows different sql query syntaxes to be supported
Copyright: Copyright (c) 2008
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_WORD |
static java.lang.String |
RETURN_CODE_WORD |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateParameter(java.lang.String name,
SQLTypeToken type,
java.lang.String typeName,
java.lang.String defaultValue,
SQLQueryParameterMode mode)
An implementation should generate string representation of sql query parameter
which conforms to the syntax which implementation presents.
|
SQLQuery |
parse(java.util.List sqlBricks,
java.lang.Object inObject)
An implementation should parse sql script which is given by
inObject parameter either as string or as sql query object
and, if sql script is given as string, create new sql query object. |
static final java.lang.String RETURN_CODE_WORD
static final java.lang.String DEFAULT_WORD
SQLQuery parse(java.util.List sqlBricks, java.lang.Object inObject) throws SQLQueryParseException, SQLQueryValidationException
inObject
parameter either as string or as sql query object
and, if sql script is given as string, create new sql query object.
If sqlBricks
list is not null the implementation should fill it
up with sql query meaningful tokens that should be either strings or instances of
SQLQueryParameter
class.
In cases when any validation fails an implementation should collect all faults in chain under one validation exception.
sqlBricks
- if it is not null the implementation should fill it
up with sql query meaningful tokens that should be either strings or instances of
SQLQueryParameter
classinObject
- sql script to be parsed given either as string or as sql query objectSQLQueryParseException
- if any parse errors occurSQLQueryValidationException
- if any query validation errors occurjava.lang.String generateParameter(java.lang.String name, SQLTypeToken type, java.lang.String typeName, java.lang.String defaultValue, SQLQueryParameterMode mode)
name
- parameter nametype
- parameter typetypeName
- SQL user defined type name(for arrays and other types)defaultValue
- parameter default valuemode
- parameter modeCopyright © 2015-2024 StreamScape Technologies. All rights reserved.