Package org.eclipse.net4j.db.dml.fluent
Interface SQLFragmentStep
public interface SQLFragmentStep
A structured fragment builder. Raw SQL text is trusted input and is not parsed; identifiers and
parameters are represented as separate structured parts so the compiler can quote identifiers
and track parameter occurrences. Prefer structured expressions for operators and explicitly
group a fragment expression when its internal precedence matters.
- Since:
- 4.15
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Captures the parts completed so far in a new immutable fragment.Appends a schema column or qualified column reference as a structured fragment part.column(SQLColumnRef column) Appends a schema column or qualified column reference as a structured fragment part.condition(SQLCondition condition) Appends a typed SQL condition as a fragment part.expression(SQLExpression expression) Appends a typed SQL expression as a fragment part.fragment(SQLFragment fragment) Appends another structured fragment without converting it to raw text.param(SQLParameter parameter) Appends the supplied logical parameter identity as a placeholder part.Appends trusted SQL text to the fragment.Appends a schema table identifier or table reference as a structured fragment part.table(SQLTableRef table) Appends a schema table identifier or table reference as a structured fragment part.
-
Method Details
-
sql
Appends trusted SQL text to the fragment. Raw text is not parsed and must not contain?, even inside a quoted SQL literal. Represent every JDBC parameter placeholder withSQL.param()or a structured fragment parameter token. Generated literals such asSQL.literal("?")are separate structured expressions and are allowed. This restriction keeps positional and identity-based JDBC binding reliable.- Parameters:
trustedSQL- trusted SQL text, supplied as a literal- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
table
Appends a schema table identifier or table reference as a structured fragment part.- Parameters:
table- the schema table or table occurrence- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
table
Appends a schema table identifier or table reference as a structured fragment part.- Parameters:
table- the schema table or table occurrence- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
column
Appends a schema column or qualified column reference as a structured fragment part.- Parameters:
column- the existing schema column- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
column
Appends a schema column or qualified column reference as a structured fragment part.- Parameters:
column- the existing schema column- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
param
Appends the supplied logical parameter identity as a placeholder part.- Parameters:
parameter- the immutable parameter identity- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
expression
Appends a typed SQL expression as a fragment part.- Parameters:
expression- the expression used by this clause- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
condition
Appends a typed SQL condition as a fragment part.- Parameters:
condition- the complete condition to add- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
fragment
Appends another structured fragment without converting it to raw text.- Parameters:
fragment- the fragment to append- Returns:
- the next valid fluent stage
- Since:
- 4.15
-
build
SQLFragment build()Captures the parts completed so far in a new immutable fragment. Later calls through a retained builder stage do not alter an already built fragment.- Returns:
- an immutable SQL fragment
- Since:
- 4.15
-