Imported Upstream version 5.3.21
[platform/upstream/libdb.git] / lang / sql / jdbc / SQLite / JDBCDriver.java17
1 package SQLite;
2
3 import java.sql.Connection;
4 import java.sql.Driver;
5 import java.sql.DriverPropertyInfo;
6 import java.sql.SQLException;
7 import java.sql.SQLFeatureNotSupportedException;
8 import java.util.Properties;
9 import java.util.logging.Logger;
10
11 public class JDBCDriver extends JDBC implements Driver {
12
13     public static final int MAJORVERSION = 1;
14
15     public static boolean sharedCache = false;
16
17     public static String vfs = null;
18
19     private static java.lang.reflect.Constructor makeConn = null;
20
21     protected Connection conn;
22
23     static {
24         try {
25             java.sql.DriverManager.registerDriver(new JDBCDriver());
26         } catch (java.lang.Exception e) {
27             System.err.println(e);
28         }
29     }
30
31     public JDBCDriver() {
32     }
33         
34     public DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
35         throws SQLException {
36         DriverPropertyInfo p[] = new DriverPropertyInfo[4];
37         DriverPropertyInfo pp = new DriverPropertyInfo("encoding", "");
38         p[0] = pp;
39         pp = new DriverPropertyInfo("password", "");
40         p[1] = pp;
41         pp = new DriverPropertyInfo("daterepr", "normal");
42         p[2] = pp;
43         pp = new DriverPropertyInfo("vfs", vfs);
44         p[3] = pp;
45         return p;
46     }
47
48     public boolean jdbcCompliant() {
49         return false;
50     }
51
52     public Logger getParentLogger() throws SQLFeatureNotSupportedException {
53         throw new SQLFeatureNotSupportedException();
54     }
55
56 }