public interface SQLEnvironment extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Begins a new SQL transaction.
|
void |
commit()
Commits the current SQL transaction.
|
<T> List<T> |
fetchAll(Query query,
SQLResultParser<T> parser,
Object... parameters)
Performs a select many query in the database.
|
<T> List<T> |
fetchAll(SQLStatement stmt,
SQLResultParser<T> parser)
Performs a select many query in the database.
|
<T> T |
fetchOne(Query query,
SQLResultParser<T> parser,
Object... parameters)
Performs a select one query in the database.
|
<T> T |
fetchOne(SQLStatement stmt,
SQLResultParser<T> parser)
Performs a select one query in the database.
|
void |
fixSchema(Schema schema)
Fix a schema (creates all missing objects) in the underlying SQL
database.
|
SQLDialect |
getDialect()
The dialect of this environment.
|
void |
rollback()
Rollbacks the current SQL transaction.
|
int |
update(Query query,
Object... parameters)
Performs an update query in the database.
|
int |
update(SQLStatement stmt)
Performs an update query in the database.
|
closeSQLDialect getDialect()
void fixSchema(Schema schema) throws SQLException
schema - The schema to fix.SQLException - If any SQL error occurs.int update(Query query, Object... parameters) throws SQLException
query - The query to execute.parameters - The parameter for the query.SQLException - If any SQL error occurs.<T> List<T> fetchAll(Query query, SQLResultParser<T> parser, Object... parameters) throws SQLException
T - The type of the result.query - The query to execute.parser - The records parser.parameters - The parameters for the query.SQLException - If any SQL error occurs.<T> T fetchOne(Query query, SQLResultParser<T> parser, Object... parameters) throws SQLException
T - The type of the result.query - The query to execute.parser - The records parser.parameters - The parameters for the query.SQLException - If any SQL error occurs.int update(SQLStatement stmt) throws SQLException
stmt - The SQL statement to execute.SQLException - If any SQL error occurs.<T> List<T> fetchAll(SQLStatement stmt, SQLResultParser<T> parser) throws SQLException
T - The type of the result.stmt - The SQL statement to execute.parser - The records parser.SQLException - If any SQL error occurs.<T> T fetchOne(SQLStatement stmt, SQLResultParser<T> parser) throws SQLException
T - The type of the result.stmt - The SQL statement to execute.parser - The records parser.SQLException - If any SQL error occurs.void begin()
throws SQLException
SQLException - If any SQL error occurs.void commit()
throws SQLException
SQLException - If any SQL error occurs.void rollback()
throws SQLException
SQLException - If any SQL error occurs.Copyright © 2015–2018 Bridje Framework. All rights reserved.