Implementation of DatabaseClient using JDBC.
More...
Public Member Functions | |
| long[] | batch (final String sql, final List< StatementBinder > binders) |
| Executes a batch of SQL commands with the specified binders. | |
| int | execute (final SqlQuery query) |
| Executes a SQL command (UPDATE, INSERT, DELETE) and returns the number of affected rows. | |
| JdbcDatabaseClient (final DataSource dataSource) | |
Creates a new JdbcDatabaseClient with the specified data source. | |
Implementation of DatabaseClient using JDBC.
This class delegates database operations to a DataSource and handles connection management, statement binding, and exception wrapping.
Definition at line 54 of file JdbcDatabaseClient.java.
| dev.rafex.ether.jdbc.client.JdbcDatabaseClient.JdbcDatabaseClient | ( | final DataSource | dataSource | ) |
Creates a new JdbcDatabaseClient with the specified data source.
| dataSource | the data source to use for database connections |
| NullPointerException | if dataSource is null |
Definition at line 64 of file JdbcDatabaseClient.java.
| long[] dev.rafex.ether.jdbc.client.JdbcDatabaseClient.batch | ( | final String | sql, |
| final List< StatementBinder > | binders ) |
Executes a batch of SQL commands with the specified binders.
| sql | the SQL command to execute |
| binders | the list of statement binders |
| DatabaseAccessException | if the batch execution fails |
Implements dev.rafex.ether.database.core.DatabaseClient.
Definition at line 161 of file JdbcDatabaseClient.java.
| int dev.rafex.ether.jdbc.client.JdbcDatabaseClient.execute | ( | final SqlQuery | query | ) |
Executes a SQL command (UPDATE, INSERT, DELETE) and returns the number of affected rows.
| query | the SQL command to execute |
| DatabaseAccessException | if the execution fails |
Implements dev.rafex.ether.database.core.DatabaseClient.
Definition at line 141 of file JdbcDatabaseClient.java.