1 package com.imcode.db.benchmark; 2 3 import com.imcode.db.jdbc.ConnectionWrapper; 4 5 import java.sql.Connection; 6 import java.sql.PreparedStatement; 7 import java.sql.SQLException; 8 9 class BenchmarkConnection extends ConnectionWrapper { 10 11 private BenchmarkDatabase benchmarkDatabase; 12 13 BenchmarkConnection(BenchmarkDatabase benchmarkDatabase, Connection connection) { 14 super(connection); 15 this.benchmarkDatabase = benchmarkDatabase; 16 } 17 18 public PreparedStatement prepareStatement(final String sql) throws SQLException { 19 return new BenchmarkPreparedStatement(benchmarkDatabase, connection.prepareStatement(sql), sql); 20 } 21 }