Package org.pjdbc.drivers
Class SinkDriver
java.lang.Object
org.pjdbc.sql.AbstractDriver
org.pjdbc.sql.AbstractProxyDriver
org.pjdbc.drivers.SinkDriver
- All Implemented Interfaces:
Driver
@DriverCapability(prefix="sink",
description="Discards all SQL operations",
capabilities="testing",
terminal=false)
public class SinkDriver
extends AbstractProxyDriver
Discards all SQL operations without executing them.
SinkDriver is useful for:
- Benchmarking driver overhead without database I/O
- Testing connection logic without a real database
- Dry-run scenarios where SQL should be generated but not executed
All execute methods return success without actually running SQL. Query methods return null ResultSets.
URL format: jdbc:sink:jdbc:target:...
Example:
jdbc:sink:jdbc:postgresql://localhost/mydb
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanacceptsSubProtocol(String subprotocol) protected StatementproxyStatement(Statement delegate, Connection conn) Methods inherited from class org.pjdbc.sql.AbstractProxyDriver
acceptsSubName, connect, getPropertyInfo, isCompositionValidationEnabled, isValidateParametersEnabled, proxyCallableStatement, proxyCallableStatement, proxyConnection, proxyConnection, proxyConnection, proxyPreparedStatement, proxyPreparedStatement, proxyResultSetMethods inherited from class org.pjdbc.sql.AbstractDriver
acceptsProtocol, acceptsURL, getMajorVersion, getMinorVersion, getParentLogger, getUrlParameter, getUrlParameter, getUrlParameters, jdbcCompliant, parseUrl, protocol, subname, subprotocol, validateParameters
-
Constructor Details
-
SinkDriver
public SinkDriver()
-
-
Method Details
-
acceptsSubProtocol
- Specified by:
acceptsSubProtocolin classAbstractDriver
-
proxyStatement
- Overrides:
proxyStatementin classAbstractProxyDriver- Throws:
SQLException
-