Package | Description |
---|---|
com.healthmarketscience.sqlbuilder |
Builder-style classes for generating a wide variety of SQL statements (see
the Syntax Reference for
the major highlights).
|
com.healthmarketscience.sqlbuilder.custom |
SqlBuilder supports two types of custom SQL:
Custom values/expressions within existing queries - this type of
customization can be achieved using the custom SqlObject variants:
CustomSql , CustomExpression , and CustomCondition .
Custom clauses added to existing queries - the classes in this package
(and subpackages) enable this type of customization, read on for
details.
|
com.healthmarketscience.sqlbuilder.custom.mysql |
SqlBuilder customizations specific to the MySQL database.
|
com.healthmarketscience.sqlbuilder.custom.oracle |
SqlBuilder customizations specific to the Oracle database.
|
com.healthmarketscience.sqlbuilder.custom.postgresql |
SqlBuilder customizations specific to the PostgreSQL database.
|
com.healthmarketscience.sqlbuilder.custom.sqlserver |
SqlBuilder customizations specific to the SQL Server database.
|
com.healthmarketscience.sqlbuilder.dbspec |
Group of interfaces which simplify the usage of SqlBuilder when multiple
queries will be built over the same collection of database objects.
|
com.healthmarketscience.sqlbuilder.dbspec.basic |
Very basic implementations of the
dbspec interfaces. |
Class and Description |
---|
AlterTableQuery
Query which generates an
ALTER TABLE statement. |
AlterTableQuery.AddColumnAction
"Action" for adding a column to a table.,
e.g.
|
AlterTableQuery.AddConstraintAction
Base "Action" for adding a constraint to a table.,
e.g.
|
AlterTableQuery.AddForeignConstraintAction
Deprecated.
use AddConstraintAction instead
|
AlterTableQuery.AddPrimaryConstraintAction
Deprecated.
use AddConstraintAction instead
|
AlterTableQuery.AddUniqueConstraintAction
Deprecated.
use AddConstraintAction instead
|
BaseCaseStatement
Common base class for
"CASE ... |
BaseCreateQuery
Query which generates a CREATE statement.
|
BaseCTEQuery
Base class for all queries which support common table expressions (the
"WITH " clause).
|
BaseGrantQuery
Base of a query which generates a query for manipulating privileges.
|
BaseGrantQuery.Privilege
Encapsulation of a database privilege.
|
BaseGrantQuery.Privilege.Type
Enumeration representing the various database privilege types
|
BaseGrantQuery.TargetObject
Information about the database object upon which a privilege allows (or
disallows) action.
|
BaseGrantQuery.TargetObject.Type
Enumeration representing the types of database objects which have
privileges for interacting with them.
|
BetweenCondition
Outputs a "BETWEEN" condition
"(<column> [NOT] BETWEEN (<rightObj1>, <rightObj2>, ...) )" |
BinaryCondition
Outputs a binary midfix based condition
"(<column1> <binaryOp> <column2>)" . |
BinaryCondition.Op
Enum representing the binary midfix operations supported in a SQL
condition, e.g.
|
BooleanValueObject
By default, outputs a boolean value as a number literal, where
true
== 1 and false == 0 . |
CaseStatement
Outputs a case statement like:
"CASE WHEN <cond1> THEN <result1> [ WHEN
<cond2> THEN <result2> WHEN ... |
CheckConstraintClause
Outputs a table or column CHECK constraint like:
"[CONSTRAINT <name> ] CHECK (<condition>)" |
ComboCondition
Outputs combination conditions joined by a given string (AND, OR)
"(<cond1> <comboOp> <cond2> <comboOp> <cond3> ...)" . |
ComboCondition.Op
Enum representing the combo operations supported in a SQL
condition, e.g.
|
ComboExpression
Outputs combination expressions joined by a given mathematical operation (+,
-, *, /) or string operation (||)
"(<expr1> <exprOp> <expr2> <exprOp> <expr3> ...)" . |
ComboExpression.Op
Enum representing the combo mathematical operations supported in a SQL
expression, e.g.
|
CommonTableExpression
Outputs the Common Table Expression (CTE) definition as part of a
"WITH " clause. |
Condition
An object representing a conditional expression.
|
ConstraintClause
Outputs a table or column constraint clause (depending on the current
context)
[ CONSTRAINT <name> ] <type> [ (<col1> ...) ] . |
ConstraintClause.CheckTime
Enum representing the different times that a constraint can be checked.
|
ConstraintClause.Type
Enum representing the types of constraints supported for a column or
table.
|
Converter
Class which encapsulates various object to SqlObject conversions.
|
CreateIndexQuery
Query which generates a CREATE INDEX statement.
|
CreateIndexQuery.Hook
The HookAnchors supported for CREATE INDEX queries.
|
CreateIndexQuery.IndexType
Enum which defines the optional index type information.
|
CreateTableQuery
Query which generates a CREATE TABLE statement.
|
CreateTableQuery.ColumnConstraint
Deprecated.
use
ConstraintClause instead |
CreateTableQuery.Hook
The HookAnchors supported for CREATE TABLE queries.
|
CreateTableQuery.TableType
Enum which defines the optional table type information.
|
CreateViewQuery
Query which generates a CREATE VIEW statement.
|
CustomCondition
Outputs the given custom object surrounded by parentheses
"(<customCond>)" . |
CustomExpression
Outputs the given custom object surrounded by parentheses
"(<customExpr>)" . |
CustomizableSqlObject
Base class for all SqlObjects which support SQL syntax customizations.
|
CustomSql
Outputs the given object as is (can be used to insert any custom SQL into a
statement).
|
DeleteQuery
Query which generates a DELETE statement.
|
DropQuery
Query which generates a DROP statement.
|
DropQuery.Behavior
Enum representing additional behavior for the drop query, e.g.:
"DROP <type> <obj> <behavior>" |
DropQuery.Type
Enum representing he type of the object being dropped
|
ExceptQuery
Query which generates a series of SELECT queries joined by EXCEPT clauses.
|
Expression
An object representing a value expression.
|
ExtractExpression
Outputs an extract expression like:
"EXTRACT(<datePart> FROM <dateExpression>)" |
ExtractExpression.DatePart
The SQL defined date parts for the extract expression.
|
ForeignKeyConstraintClause
Outputs a table or column foreign constraint clause (depending on the
current context)
[ CONSTRAINT <name> ] FOREIGN KEY [ (<col1> ...) ] REFERENCES <refRable> [ (<refCol1> ...) ] . |
ForeignKeyConstraintClause.ReferentialAction
Enum representing the referential action to be taken on update/delete.
|
FunctionCall
Outputs a function call
"<name>([<param1>, ... |
GrantQuery
Query which generates a GRANT (privileges) statement.
|
InCondition
Outputs an "IN" condition
"(<column> [NOT] IN (<rightObj1>, <rightObj2>, ...) )" |
InsertQuery
Query which generates a simple INSERT statement.
|
InsertSelectQuery
Query which generates an INSERT statement where the data is generated from
a SELECT query.
|
IntersectQuery
Query which generates a series of SELECT queries joined by INTERSECT
clauses.
|
JdbcEscape
Outputs SQL and a prefix enclosed within JDBC escape syntax
"{<prefix> <sql>}" . |
JdbcEscape.Type
Enum which defines the escape types supported.
|
JdbcScalarFunction
Outputs a JDBC escaped scalar function call
"{fn <funcCall>}" . |
NegateExpression
Outputs the negation of the given expression "(- <expression>)"
|
NotCondition
Outputs the negation of the given condition "(NOT <condition>)"
|
OrderObject
Outputs the given object along with an order specification
<obj> <dir> |
OrderObject.Dir
Enumeration representing the direction of an ordering clause
|
OrderObject.NullOrder
Enumeration representing the order of NULL
|
Query
Base class for all query statements which adds a validation facility.
|
QueryPreparer
Helper class which keeps track of '?' positions in dynamically generated
prepared statements so that the query user can easily set the parameters
correctly, especially useful where the code which generates the prepared
query is separate from the code which uses the prepared query.
|
QueryPreparer.ListPlaceHolder
A SqlObject which outputs 0 or more '?' separated by commas, and records
the current indexes at the times the
appendTo method is
called. |
QueryPreparer.MultiPlaceHolder
A SqlObject which outputs a '?', and records the current index at the
time(s) the
appendTo method is called. |
QueryPreparer.ObjectStaticPlaceHolder
StaticPlaceHolder which calls setObject on the PreparedStatement
with the saved value.
|
QueryPreparer.PlaceHolder
A SqlObject which outputs a '?', and records the current index at the
time the
appendTo method is called. |
QueryPreparer.StaticPlaceHolder
Convenience PlaceHolder which also maintains a value which will always be
inserted into the PreparedStatement when
setValue is called. |
QueryReader
Helper class which keeps track of the column positions in dynamically
generated select statements so that the query user can easily get the
results correctly, especially useful where the code which generates the
query is separate from the code which uses the query.
|
QueryReader.Column
A SqlObject which outputs the passed in SqlObject, and records the
current index at the time the
appendTo method is called. |
RevokeQuery
Query which generates a REVOKE (privileges) statement.
|
SelectQuery
Query which generates a SELECT statement.
|
SelectQuery.Hook
The HookAnchors supported for SELECT queries.
|
SelectQuery.JoinType
Enum which defines the join types supported in a FROM clause.
|
SetOperationQuery
Base query for queries which generate a series of SELECT queries joined by
one or more "set operations", such as UNION [ALL], EXCEPT [ALL], and
INTERSECT [ALL].
|
SetOperationQuery.Type
Enumeration representing the type of union to use
|
SimpleCaseStatement
Outputs a simple case statement like:
"CASE <column1> WHEN <val1> THEN <result1> [ WHEN
<val2> THEN <result2> WHEN ... |
SqlContext
Object which maintains context for the sqlbuilder classes when a SQL
statement is being generated.
|
SqlObject
Base object which all classes in this facility extend.
|
SqlObjectList
Maintains a list of SqlObjects.
|
Subquery
Outputs the given query surrounded by parentheses
"(<query>)" , useful for embedding one query within
another. |
UnaryCondition
Outputs a unary based condition
"(<column> <unaryOp>)" or
"(<unaryOp> <column>)" . |
UnaryCondition.CustomUnaryOp
Interface which can be implemented to provide a custom unary operation.
|
UnaryCondition.Op
Enum representing the unary operations supported in a SQL condition,
e.g.
|
UnionQuery
Query which generates a series of SELECT queries joined by UNION clauses.
|
UpdateQuery
Query which generates an UPDATE statement.
|
ValidationContext
Object used to accummulate state during query validation.
|
ValidationException
Indicates that a sql builder query is not valid.
|
Verifiable
Interface for SqlObjects wishing to provide verifiablity.
|
WindowDefinitionClause
Outputs a window function clause like:
([PARTITION BY <cols>] [ORDER BY <cols>] [<frameClause>])
Can be used inline on a FunctionCall or via a named reference in a
SelectQuery . |
WindowDefinitionClause.FrameBound
Outputs a bound for the window frame clause.
|
WindowDefinitionClause.FrameExclusion
Outputs the exclusion for the window frame clause.
|
WindowDefinitionClause.FrameUnits
Outputs the units for the window frame clause.
|
Class and Description |
---|
CreateIndexQuery
Query which generates a CREATE INDEX statement.
|
CreateTableQuery
Query which generates a CREATE TABLE statement.
|
Expression
An object representing a value expression.
|
SelectQuery
Query which generates a SELECT statement.
|
SqlObject
Base object which all classes in this facility extend.
|
ValidationContext
Object used to accummulate state during query validation.
|
Class and Description |
---|
SelectQuery
Query which generates a SELECT statement.
|
SqlObject
Base object which all classes in this facility extend.
|
ValidationContext
Object used to accummulate state during query validation.
|
ValidationException
Indicates that a sql builder query is not valid.
|
Verifiable
Interface for SqlObjects wishing to provide verifiablity.
|
Class and Description |
---|
CreateIndexQuery
Query which generates a CREATE INDEX statement.
|
CreateTableQuery
Query which generates a CREATE TABLE statement.
|
SqlObject
Base object which all classes in this facility extend.
|
ValidationContext
Object used to accummulate state during query validation.
|
Class and Description |
---|
BinaryCondition
Outputs a binary midfix based condition
"(<column1> <binaryOp> <column2>)" . |
Condition
An object representing a conditional expression.
|
SelectQuery
Query which generates a SELECT statement.
|
SqlObject
Base object which all classes in this facility extend.
|
ValidationContext
Object used to accummulate state during query validation.
|
ValidationException
Indicates that a sql builder query is not valid.
|
Verifiable
Interface for SqlObjects wishing to provide verifiablity.
|
Class and Description |
---|
SelectQuery
Query which generates a SELECT statement.
|
SqlObject
Base object which all classes in this facility extend.
|
ValidationContext
Object used to accummulate state during query validation.
|
Class and Description |
---|
Condition
An object representing a conditional expression.
|
Class and Description |
---|
Condition
An object representing a conditional expression.
|
Copyright © 2006–2021 OpenHMS. All rights reserved.