Package org.datanucleus.store.rdbms.sql
Series of classes used to generate SQL statements. Based around the notion that an SQL statement (SQLStatement) has a series of tables (SQLTable) involved, with a series of joins (SQLJoin), subject to a series of conditions, based on expressions (see org.datanucleus.store.rdbms.sql.expression. The tables involved in the statement can be grouped for convenience to represent objects and relations between objects (like in JDOQL/JPQL). This package has now replaced FetchStatement, and will also replace QueryStatement, StatementText and all code under org.datanucleus.store.mapped.expression.
Provides helpers to generate the SQLStatement. These include
- DiscriminatorStatementGenerator that selects a candidate table and uses the discriminator column of that table (or of its supertable) to identify the returned object
- UnionStatementGenerator that does a UNION of all possible candidates selecting a column "NUCLEUS_TYPE" to identify the object type of the row.
- Numerous methods of SQLStatementHelper to assist in joining between tables of an inheritance tree, and across relations.
Allows control over how tables in the SQL statement are aliased. This uses a plugin-point org.datanucleus.store.rdbms.sql_tablenamer and DataNucleus provides the following options
- alpha-scheme where tables are named using a letter to symbolise their "table-group", followed by a number for the number within that group. So you get names like A0, A1, A2, A3, B0, B1, C0 etc
- t-scheme where tables are named T0, T1, T2, T3, etc
-
ClassDescriptionAbstract generator of SQLStatements.SQL DELETE Statement representation.Class to generate a SelectStatement for iterating through instances of a particular type (and optionally subclasses).SQL INSERT Statement representation.SQL SELECT Statement representation.Generator of SQL SELECT Statements.Representation of a column reference in an SQL statement.Representation of a join in an SQL statement.Class providing an API for generating SQL statements.Series of convenience methods to help the process of generating SQLStatements.Representation of an SQLStatement parameter.Representation of a table reference in an SQL statement.SQLTable namer that generates names like A0, B1, C0, ...Group of tables in an SQL statement.SQLTable namer that uses the table name as the "alias".Interface to be implemented by a class providing naming for SQL tables.SQLTable namer that generates names like T0, T1, T2, etc.Representation of a snippet of an SQL statement.Class to generate a SelectStatement for iterating through instances of a particular type (and optionally subclasses).SQL UPDATE Statement representation.