Skip to content

Instantly share code, notes, and snippets.

@roundrop
Created October 2, 2013 06:52
Show Gist options
  • Save roundrop/6789917 to your computer and use it in GitHub Desktop.
Save roundrop/6789917 to your computer and use it in GitHub Desktop.
S2JDBC で PostgreSQL の CopyManager を取得する方法
public CopyManager getCopyManager() throws SQLException {
Connection conn = ((JdbcManagerImplementor) jdbcManager).getDataSource().getConnection();
XAConnection xaConn = ((ConnectionWrapperImpl) conn).getXAConnection();
Connection pgConn = xaConn.getConnection();
return ((PGConnection) pgConn).getCopyAPI();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment