-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from twosigma/jarek/10_bx_driver_manager
jarek/kernel_base_10: add BxDriverManager
- Loading branch information
Showing
4 changed files
with
106 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2020 TWO SIGMA OPEN SOURCE, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
|
||
dependencies { | ||
testCompile group: 'junit', name: 'junit', version: '4.12' | ||
} | ||
|
||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId 'com.twosigma' | ||
artifactId 'beakerx-runtimetools' | ||
version "$beakerxVersion" | ||
from components.java | ||
} | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
runtimetools/src/main/java/com/twosigma/beakerx/BxDriverManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2018 TWO SIGMA OPEN SOURCE, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.twosigma.beakerx; | ||
|
||
import java.sql.Connection; | ||
import java.sql.Driver; | ||
import java.sql.DriverManager; | ||
import java.sql.SQLException; | ||
|
||
public class BxDriverManager { | ||
|
||
public static Connection getConnection(String url) throws SQLException { | ||
return DriverManager.getConnection(url); | ||
} | ||
|
||
public static Connection getConnection(String url, String user, String password) throws SQLException { | ||
return DriverManager.getConnection(url, user, password); | ||
} | ||
|
||
public static Connection getConnection(String url, java.util.Properties info) throws SQLException { | ||
return DriverManager.getConnection(url, info); | ||
} | ||
|
||
public static Driver getDriver(String url) throws SQLException { | ||
return DriverManager.getDriver(url); | ||
} | ||
|
||
public static java.util.Enumeration<Driver> getDrivers() { | ||
return DriverManager.getDrivers(); | ||
} | ||
|
||
public static synchronized void registerDriver(Driver driver) throws SQLException { | ||
DriverManager.registerDriver(driver); | ||
} | ||
|
||
public static synchronized void deregisterDriver(Driver driver) throws SQLException { | ||
DriverManager.deregisterDriver(driver); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters