Interface SqlClient<T>
- Type Parameters:
T
- the original
- All Superinterfaces:
Client<T>
- All Known Implementing Classes:
H2Client
,HikariSqlClient
,JavaSqlClient
The interface for SQL client
-
Method Summary
Modifier and TypeMethodDescriptiondefault BatchBuilder
createBatchBuilder
(String statement) Create a new batch builder for this clientdefault Optional<BatchBuilder>
createBatchBuilderSafe
(String statement) Create a new batch builder for this client but ignores exceptionsdefault StatementBuilder
Create a new statement builder for this clientdefault Optional<StatementBuilder>
Create a new statement builder for this client but ignores exceptionsGet the connectionMethods inherited from interface me.hsgamer.hscore.database.Client
getOriginal, getSetting
-
Method Details
-
getConnection
Get the connection- Returns:
- the connection
- Throws:
SQLException
- if there is an SQL error
-
createStatementBuilder
Create a new statement builder for this client- Returns:
- the statement builder
- Throws:
SQLException
- if there is an SQL error
-
createStatementBuilderSafe
Create a new statement builder for this client but ignores exceptions- Returns:
- the statement builder
-
createBatchBuilder
Create a new batch builder for this client- Parameters:
statement
- the statement- Returns:
- the batch builder
- Throws:
SQLException
- if there is an SQL error
-
createBatchBuilderSafe
Create a new batch builder for this client but ignores exceptions- Parameters:
statement
- the statement- Returns:
- the batch builder
-