17 package ai.heavy.jdbc;
19 import org.slf4j.LoggerFactory;
21 import java.io.IOException;
22 import java.io.InputStream;
23 import java.sql.Connection;
24 import java.sql.DriverManager;
25 import java.sql.DriverPropertyInfo;
26 import java.sql.SQLException;
27 import java.util.Properties;
28 import java.util.logging.Logger;
35 final static org.slf4j.Logger
logger = LoggerFactory.getLogger(HeavyAIDriver.class);
43 }
catch (SQLException e) {
47 try (InputStream input =
HeavyAIDriver.class.getClassLoader().getResourceAsStream(
49 Properties prop =
new Properties();
55 String[]
version = DriverVersion.split(
"\\.");
59 }
catch (NumberFormatException ex) {
60 logger.error(
"Unexpected driver version format in " +
VERSION_FILE);
61 DriverVersion =
"UNKNOWN";
64 }
catch (IOException e) {
70 public Connection
connect(String url, Properties info)
81 public boolean acceptsURL(String url)
throws SQLException {
100 throws SQLException {
static final org.slf4j.Logger logger
static final String MAPD_PREFIX
static int DriverMajorVersion
boolean acceptsURL(String url)
static final String VERSION_FILE
DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
Connection connect(String url, Properties info)
static boolean isValidURL(String url)
static String DriverVersion
static final String HEAVYAI_PREFIX
static int DriverMinorVersion
static final String OMNISCI_PREFIX