Interface SqlAstTranslatorFactory

All Known Implementing Classes:
StandardSqlAstTranslatorFactory

@SPI({IMPLEMENT,SUPPLY}) public interface SqlAstTranslatorFactory

Factory supplied by a Dialect for creating single-use SQL AST translators.

Implementors should normally extend StandardSqlAstTranslatorFactory and override its typed creation hook. Return a translator derived from AbstractSqlAstTranslator, or an appropriate supported family base, when rendering SQL. For a fundamentally different JDBC command language, the factory may instead return a direct SqlAstTranslator implementation, normally based on AbstractSqlAstWalker. A factory may inspect the SqlAstTranslationRequest subtype, but must preserve its statement-to-JDBC-operation type relationship and must not retain the request.

Hibernate may reuse a factory for the lifetime of the Dialect, so a supplied factory should be stateless or otherwise safe for concurrent use. Each translator returned by buildTranslator(SqlAstTranslationRequest) is used for exactly one request.

Since:
8.0
See Also: