Package | Description |
---|---|
com.healthmarketscience.common.util | |
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.
|
Modifier and Type | Class and Description |
---|---|
class |
AppendeeObject
Simple subclass for objects wishing to use the AppendableExt/Appendee
interface in new class hierarchies.
|
Modifier and Type | Method and Description |
---|---|
StringAppendableExt |
StringAppendableExt.append(Appendee a) |
AppendableExt |
AppendableExt.append(Appendee a)
Will call the appendTo() method on the given object.
|
Modifier and Type | Class and Description |
---|---|
class |
AliasedObject
Outputs the given object with a column alias
"<obj> AS <alias>" . |
class |
AlterTableQuery
Query which generates an
ALTER TABLE statement. |
static class |
AlterTableQuery.AddColumnAction
"Action" for adding a column to a table.,
e.g.
|
static class |
AlterTableQuery.AddConstraintAction
Base "Action" for adding a constraint to a table.,
e.g.
|
static class |
AlterTableQuery.AddForeignConstraintAction
Deprecated.
use AddConstraintAction instead
|
static class |
AlterTableQuery.AddPrimaryConstraintAction
Deprecated.
use AddConstraintAction instead
|
static class |
AlterTableQuery.AddUniqueConstraintAction
Deprecated.
use AddConstraintAction instead
|
class |
BaseCaseStatement<ThisType extends BaseCaseStatement<ThisType>>
Common base class for
"CASE ... |
class |
BaseCreateQuery<ThisType extends BaseCreateQuery<ThisType>>
Query which generates a CREATE statement.
|
class |
BaseCTEQuery<ThisType extends BaseCTEQuery<ThisType>>
Base class for all queries which support common table expressions (the
"WITH " clause).
|
class |
BaseGrantQuery<ThisType extends BaseGrantQuery<ThisType>>
Base of a query which generates a query for manipulating privileges.
|
static class |
BaseGrantQuery.Privilege
Encapsulation of a database privilege.
|
static class |
BaseGrantQuery.TargetObject
Information about the database object upon which a privilege allows (or
disallows) action.
|
class |
BetweenCondition
Outputs a "BETWEEN" condition
"(<column> [NOT] BETWEEN (<rightObj1>, <rightObj2>, ...) )" |
class |
BinaryCondition
Outputs a binary midfix based condition
"(<column1> <binaryOp> <column2>)" . |
class |
BooleanValueObject
By default, outputs a boolean value as a number literal, where
true
== 1 and false == 0 . |
class |
CaseStatement
Outputs a case statement like:
"CASE WHEN <cond1> THEN <result1> [ WHEN
<cond2> THEN <result2> WHEN ... |
class |
CheckConstraintClause
Outputs a table or column CHECK constraint like:
"[CONSTRAINT <name> ] CHECK (<condition>)" |
class |
ComboCondition
Outputs combination conditions joined by a given string (AND, OR)
"(<cond1> <comboOp> <cond2> <comboOp> <cond3> ...)" . |
class |
ComboExpression
Outputs combination expressions joined by a given mathematical operation (+,
-, *, /) or string operation (||)
"(<expr1> <exprOp> <expr2> <exprOp> <expr3> ...)" . |
class |
Comment
Generates a comment, e.g.
|
class |
CommonTableExpression
Outputs the Common Table Expression (CTE) definition as part of a
"WITH " clause. |
class |
Condition
An object representing a conditional expression.
|
class |
ConstraintClause
Outputs a table or column constraint clause (depending on the current
context)
[ CONSTRAINT <name> ] <type> [ (<col1> ...) ] . |
class |
CreateIndexQuery
Query which generates a CREATE INDEX statement.
|
class |
CreateTableQuery
Query which generates a CREATE TABLE statement.
|
class |
CreateViewQuery
Query which generates a CREATE VIEW statement.
|
class |
CustomCondition
Outputs the given custom object surrounded by parentheses
"(<customCond>)" . |
class |
CustomExpression
Outputs the given custom object surrounded by parentheses
"(<customExpr>)" . |
class |
CustomizableSqlObject
Base class for all SqlObjects which support SQL syntax customizations.
|
class |
CustomSql
Outputs the given object as is (can be used to insert any custom SQL into a
statement).
|
class |
DeleteQuery
Query which generates a DELETE statement.
|
class |
DropQuery
Query which generates a DROP statement.
|
class |
ExceptQuery
Query which generates a series of SELECT queries joined by EXCEPT clauses.
|
class |
Expression
An object representing a value expression.
|
class |
ExtractExpression
Outputs an extract expression like:
"EXTRACT(<datePart> FROM <dateExpression>)" |
class |
ForeignKeyConstraintClause
Outputs a table or column foreign constraint clause (depending on the
current context)
[ CONSTRAINT <name> ] FOREIGN KEY [ (<col1> ...) ] REFERENCES <refRable> [ (<refCol1> ...) ] . |
class |
FunctionCall
Outputs a function call
"<name>([<param1>, ... |
class |
GrantQuery
Query which generates a GRANT (privileges) statement.
|
class |
InCondition
Outputs an "IN" condition
"(<column> [NOT] IN (<rightObj1>, <rightObj2>, ...) )" |
class |
InsertQuery
Query which generates a simple INSERT statement.
|
class |
InsertSelectQuery
Query which generates an INSERT statement where the data is generated from
a SELECT query.
|
class |
IntersectQuery
Query which generates a series of SELECT queries joined by INTERSECT
clauses.
|
class |
JdbcEscape
Outputs SQL and a prefix enclosed within JDBC escape syntax
"{<prefix> <sql>}" . |
class |
JdbcScalarFunction
Outputs a JDBC escaped scalar function call
"{fn <funcCall>}" . |
class |
NegateExpression
Outputs the negation of the given expression "(- <expression>)"
|
class |
NotCondition
Outputs the negation of the given condition "(NOT <condition>)"
|
class |
NumberValueObject
Outputs a number literal
<value> . |
class |
OrderObject
Outputs the given object along with an order specification
<obj> <dir> |
class |
Query<ThisType extends Query<ThisType>>
Base class for all query statements which adds a validation facility.
|
static class |
QueryPreparer.BooleanStaticPlaceHolder
StaticPlaceHolder which calls setInt on the PreparedStatement
with the saved value.
|
static class |
QueryPreparer.IntegerStaticPlaceHolder
StaticPlaceHolder which calls setInt on the PreparedStatement
with the saved value.
|
static class |
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. |
static class |
QueryPreparer.LongStaticPlaceHolder
StaticPlaceHolder which calls setLong on the PreparedStatement
with the saved value.
|
static class |
QueryPreparer.MultiPlaceHolder
A SqlObject which outputs a '?', and records the current index at the
time(s) the
appendTo method is called. |
static class |
QueryPreparer.NullStaticPlaceHolder
StaticPlaceHolder which always calls setNull on the PreparedStatement
with the saved sql type.
|
static class |
QueryPreparer.ObjectStaticPlaceHolder<ObjType>
StaticPlaceHolder which calls setObject on the PreparedStatement
with the saved value.
|
static class |
QueryPreparer.PlaceHolder
A SqlObject which outputs a '?', and records the current index at the
time the
appendTo method is called. |
static class |
QueryPreparer.StaticPlaceHolder
Convenience PlaceHolder which also maintains a value which will always be
inserted into the PreparedStatement when
setValue is called. |
static class |
QueryPreparer.StringStaticPlaceHolder
StaticPlaceHolder which calls setString on the PreparedStatement
with the saved value.
|
static class |
QueryPreparer.TypedStaticPlaceHolder
StaticPlaceHolder which calls setObject on the PreparedStatement
with the saved value and the saved sql type.
|
static class |
QueryReader.Column
A SqlObject which outputs the passed in SqlObject, and records the
current index at the time the
appendTo method is called. |
class |
RevokeQuery
Query which generates a REVOKE (privileges) statement.
|
class |
SelectQuery
Query which generates a SELECT statement.
|
class |
SetOperationQuery<ThisType extends SetOperationQuery<ThisType>>
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].
|
class |
SimpleCaseStatement
Outputs a simple case statement like:
"CASE <column1> WHEN <val1> THEN <result1> [ WHEN
<val2> THEN <result2> WHEN ... |
class |
SqlObject
Base object which all classes in this facility extend.
|
class |
SqlObjectList<ObjType extends SqlObject>
Maintains a list of SqlObjects.
|
class |
Subquery
Outputs the given query surrounded by parentheses
"(<query>)" , useful for embedding one query within
another. |
class |
UnaryCondition
Outputs a unary based condition
"(<column> <unaryOp>)" or
"(<unaryOp> <column>)" . |
class |
UnionQuery
Query which generates a series of SELECT queries joined by UNION clauses.
|
class |
UpdateQuery
Query which generates an UPDATE statement.
|
class |
ValueObject
Outputs a quoted value
"'<value>'" . |
class |
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 . |
static class |
WindowDefinitionClause.FrameBound
Outputs a bound for the window frame clause.
|
Modifier and Type | Class and Description |
---|---|
class |
CustomSyntax
Utility base class for custom SQL syntax instances.
|
class |
NamedParamObject
SqlObject expression which inserts a "named" parameter like
":<name>" . |
Modifier and Type | Class and Description |
---|---|
class |
MysLimitClause
Appends a MySQL limit clause like
" LIMIT [<offset>] <limit>" for
use in SelectQuery s. |
Modifier and Type | Class and Description |
---|---|
class |
OraTableSpaceClause
Appends an Oracle
" TABLESPACE ..." clause to a CreateTableQuery or CreateIndexQuery if a tableSpace has been
specified. |
Modifier and Type | Class and Description |
---|---|
class |
PgBinaryCondition
Condition which supports PostgreSQL specific binary operators.
|
class |
PgLimitClause
Appends a PostgreSQL limit clause like
" LIMIT <limit>" for use in
SelectQuery s. |
class |
PgOffsetClause
Appends a PostgreSQL offset clause like
" OFFSET <offset>" for use in
SelectQuery s. |
Modifier and Type | Class and Description |
---|---|
class |
MssTopClause
Appends a SQLServer TOP clause like
" TOP <count> [PERCENT]" for
use in SelectQuery s. |
Copyright © 2006–2021 OpenHMS. All rights reserved.