JDBC Drivers
Register JDBC database drivers in your BoxLang module (Java only)
Registration Methods
import java.sql.*;
public class MyJDBCDriver implements Driver {
static {
try {
DriverManager.registerDriver( new MyJDBCDriver() );
} catch ( SQLException e ) {
throw new RuntimeException( "Failed to register driver", e );
}
}
@Override
public Connection connect( String url, Properties info ) {
// Return connection if URL matches
}
@Override
public boolean acceptsURL( String url ) {
return url.startsWith( "jdbc:mydb:" );
}
// ... other Driver methods
}Module Structure
Open Source JDBC Modules
Module
Database
Next Steps
Last updated
Was this helpful?
