|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmondrian.test.SqlPattern
public class SqlPattern
Pattern for a SQL statement (or fragment thereof) expected to be produced during the course of running a test.
A pattern contains a dialect. This allows a test to run against different dialects.
SqlQuery.Dialect
Nested Class Summary | |
---|---|
static class |
SqlPattern.Dialect
SQL dialect definition. |
Constructor Summary | |
---|---|
SqlPattern(Set<SqlPattern.Dialect> dialects,
String sql,
int startsWithLen)
Creates a pattern which applies to a collection of dialects and is triggered by the first N characters of the expected statement. |
|
SqlPattern(Set<SqlPattern.Dialect> dialects,
String sql,
String triggerSql)
Creates a pattern which applies a collection of dialects. |
|
SqlPattern(SqlPattern.Dialect dialect,
String sql,
int startsWithLen)
Creates a pattern which applies to one or more dialects and is triggered by the first N characters of the expected statement. |
|
SqlPattern(SqlPattern.Dialect dialect,
String sql,
String triggerSql)
Creates a pattern which applies to one or more dialects. |
Method Summary | |
---|---|
static SqlPattern |
getPattern(SqlPattern.Dialect d,
SqlPattern[] patterns)
|
String |
getSql()
|
String |
getTriggerSql()
|
boolean |
hasDialect(SqlPattern.Dialect d)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SqlPattern(Set<SqlPattern.Dialect> dialects, String sql, int startsWithLen)
dialects
- Set of dialectssql
- SQL statementstartsWithLen
- Length of prefix of statement to considerpublic SqlPattern(SqlPattern.Dialect dialect, String sql, int startsWithLen)
dialect
- Dialectsql
- SQL statementstartsWithLen
- Length of prefix of statement to considerpublic SqlPattern(SqlPattern.Dialect dialect, String sql, String triggerSql)
dialect
- Dialectsql
- SQL statementtriggerSql
- Prefix of SQL statement which triggers a match; null
means whole statementpublic SqlPattern(Set<SqlPattern.Dialect> dialects, String sql, String triggerSql)
dialects
- Set of dialectssql
- SQL statementtriggerSql
- Prefix of SQL statement which triggers a match; null
means whole statementMethod Detail |
---|
public static SqlPattern getPattern(SqlPattern.Dialect d, SqlPattern[] patterns)
public boolean hasDialect(SqlPattern.Dialect d)
public String getSql()
public String getTriggerSql()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |