Annotation Interface Jdbc.Statement
- Enclosing class:
Jdbc
Every abstract JDBC repository method must declare this annotation. The SQL statement may use named markers matching Java parameter names or positional JDBC markers. A statement must use one style consistently.
A repository invocation supplies the SQL, after rewriting any named bind
markers, to the driver as one PreparedStatement. Helidon
validates the repository method and bind markers but does not parse
database grammar, split scripts, or validate statement boundaries
specific to a database. The value must therefore describe exactly one
SQL statement. SQL scripts, batches, compound or multiple statement
strings specific to a JDBC driver, stored procedure calls, SQL that
controls transactions, and commands that change connection or session
state, including auto-commit mode, are not supported.
A single schema definition statement may be executed when the repository invocation does not participate in a Helidon local JDBC transaction. The invocation then uses its own connection in auto-commit mode, and the statement executes as an independent auto-commit operation. Schema definition statements and any other statements with semantics specific to a database that implicitly commit or otherwise end a transaction are not supported while participating in a Helidon local JDBC transaction. This restriction applies regardless of whether the database supports transactional DDL.
Helidon treats the SQL as opaque: it does not classify statements or reliably detect an implicit commit. If unsupported SQL is executed within a local transaction, a database may commit pending work while leaving JDBC auto-commit disabled. A later rollback cannot undo that committed work. Consequently, a repository operation or transaction failure does not establish that the database made no changes, and applications must not retry the operation automatically.
-
Required Element Summary
Required Elements
-
Element Details
-
value
-