Package org.apache.juneau.beanquery.sql
package org.apache.juneau.beanquery.sql
Shared JDBC
BeanQueryContext plumbing for BeanQuery (design §5.3).
This package is the public API of the juneau-beanquery-sql module:
SqlBeanQueryContext (built once: dialect, table, columns, guard, connection
source), SqlBeanQuerySession (one connection per request, streaming
cursors), dialect-agnostic WHERE assembly, parameter binding, and the
SqlDialect hook. Dialects (for example the Postgres dialect in
juneau-beanquery-postgres) live in their own modules. The query carrier and operator API stay in
org.apache.juneau.commons.beanquery.
-
ClassDescriptionMaps a logical column name to its dialect-quoted SQL reference, for
SqlSearchCompiler.The SQL callback an application supplies for a custom search operator (design §5.3) so a SQL context can render it into aWHEREclause.The shared JDBCBeanQueryContext: renders validated queries into SQL for aSqlDialectand runs them on a connection from a configured source.Builder forSqlBeanQueryContext.ABeanQuerySessionon one JDBC connection.Builder forSqlBeanQuerySession.The SQL-generation strategy for a SQLBeanQueryContext: it quotes identifiers, renders each built-in$-operator into a dialect-correct predicate, and renders pagination.A parameterized SQL predicate fragment: a boolean SQL expression plus the ordered bind values its?placeholders consume.SqlRowMapper<T>Turns the currentResultSetrow into a bean, forBeanQuerySession.find(BeanQuery)andBeanQuerySession.stream(BeanQuery).A fully-rendered SQL statement: the text (with?placeholders) plus its ordered bind values, and the selected column names inSELECTorder.