Package io.github.torand.fastersql.sql
Class Context
java.lang.Object
io.github.torand.fastersql.sql.Context
Holds the context of statement SQL builders.
-
Method Summary
Modifier and TypeMethodDescriptionGets the current statement command.Gets the SQL dialect.Gets the current outer statements, if any.boolean
Indicates whether the current statement clause is a specific clause.boolean
Indicates whether the current statement command is a specific command.static Context
Creates context with specified SQL dialect.withClause
(Clause clause) Sets the current statement clause.withCommand
(Command command) Sets the current statement command.withOuterStatement
(SelectStatement outerStatement) Sets the current outer statement.
-
Method Details
-
of
Creates context with specified SQL dialect.- Parameters:
dialect
- the SQL dialect.- Returns:
- the context.
-
withCommand
Sets the current statement command.- Parameters:
command
- the statement command.- Returns:
- the modified context.
-
withClause
Sets the current statement clause.- Parameters:
clause
- the clause.- Returns:
- the modified context.
-
withOuterStatement
Sets the current outer statement.- Parameters:
outerStatement
- the outer statement.- Returns:
- the modified context.
-
getDialect
Gets the SQL dialect.- Returns:
- the SQL dialect.
-
getCommand
Gets the current statement command.- Returns:
- the statement command.
-
isCommand
Indicates whether the current statement command is a specific command.- Parameters:
command
- the command.- Returns:
- true if the current command matches; false if not.
-
isClause
Indicates whether the current statement clause is a specific clause.- Parameters:
clause
- the clause.- Returns:
- true if the current clause matches; false if not.
-
getOuterStatements
Gets the current outer statements, if any.- Returns:
- the outer statements.
-