public class ExceptionFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
ExceptionFactory.SqlExceptionFactory
Exception with SQL command
|
| Constructor and Description |
|---|
ExceptionFactory(Configuration conf,
HostAddress hostAddress)
Connection Exception factory constructor
|
| Modifier and Type | Method and Description |
|---|---|
SQLException |
create(String message)
Creation of an exception
|
SQLException |
create(String message,
String sqlState)
Creation of an exception
|
SQLException |
create(String message,
String sqlState,
Exception cause)
Creation of an exception
|
SQLException |
create(String message,
String sqlState,
int errorCode)
Creation of an exception
|
BatchUpdateException |
createBatchUpdate(List<com.singlestore.jdbc.client.Completion> res,
int length,
int[] responseMsg,
SQLException sqle)
Create a BatchUpdateException, filling successful updates
|
BatchUpdateException |
createBatchUpdate(List<com.singlestore.jdbc.client.Completion> res,
int length,
SQLException sqle)
Create a BatchUpdateException, filling successful updates
|
String |
getSql()
get SQL command
|
SQLException |
notSupported(String message)
fast creation of SQLFeatureNotSupportedException exception
|
ExceptionFactory |
of(Statement statement)
Construct an Exception factory from this + adding current statement
|
ExceptionFactory |
setConnection(Connection connection)
Set connection to factory
|
void |
setConnection(ExceptionFactory oldExceptionFactory)
Set connection
|
ExceptionFactory |
setPoolConnection(SingleStorePoolConnection internalPoolConnection)
Set pool connection to factory
|
void |
setThreadId(long threadId)
Set connection thread id
|
ExceptionFactory |
withSql(String sql)
Construct an Exception factory from this + adding current SQL
|
public ExceptionFactory(Configuration conf, HostAddress hostAddress)
conf - configurationhostAddress - current hostpublic void setConnection(ExceptionFactory oldExceptionFactory)
oldExceptionFactory - previous connection exception factorypublic ExceptionFactory setConnection(Connection connection)
connection - connectionExceptionFactorypublic ExceptionFactory setPoolConnection(SingleStorePoolConnection internalPoolConnection)
internalPoolConnection - internal pool connectionExceptionFactorypublic void setThreadId(long threadId)
threadId - connection thread idpublic BatchUpdateException createBatchUpdate(List<com.singlestore.jdbc.client.Completion> res, int length, SQLException sqle)
res - completion listlength - expected sizesqle - exceptionpublic BatchUpdateException createBatchUpdate(List<com.singlestore.jdbc.client.Completion> res, int length, int[] responseMsg, SQLException sqle)
res - completion listlength - expected lengthresponseMsg - successful responsesqle - exceptionpublic ExceptionFactory of(Statement statement)
statement - current statementpublic ExceptionFactory withSql(String sql)
sql - current sql commandpublic SQLException notSupported(String message)
message - error messagepublic SQLException create(String message)
message - error messagepublic SQLException create(String message, String sqlState)
message - error messagesqlState - sql statepublic SQLException create(String message, String sqlState, Exception cause)
message - error messagesqlState - sql statecause - initial exceptionpublic SQLException create(String message, String sqlState, int errorCode)
message - error messagesqlState - sql stateerrorCode - error codepublic String getSql()
Copyright © 2025 SingleStore. All rights reserved.