Mercurial > hg > monetdb-java
comparison src/main/java/org/monetdb/jdbc/MonetDriver.java @ 834:5aa19bbed0d6 monetdbs
Comments and formatting
author | Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com> |
---|---|
date | Wed, 13 Dec 2023 15:39:47 +0100 (17 months ago) |
parents | aa4108a5bc34 |
children | d9a45743536d |
comparison
equal
deleted
inserted
replaced
813:a71afa48f269 | 834:5aa19bbed0d6 |
---|---|
6 * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. | 6 * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. |
7 */ | 7 */ |
8 | 8 |
9 package org.monetdb.jdbc; | 9 package org.monetdb.jdbc; |
10 | 10 |
11 import org.monetdb.mcl.net.MonetUrlParser; | |
12 import org.monetdb.mcl.net.Parameter; | |
13 import org.monetdb.mcl.net.Target; | 11 import org.monetdb.mcl.net.Target; |
14 import org.monetdb.mcl.net.ValidationError; | 12 import org.monetdb.mcl.net.ValidationError; |
15 | 13 |
16 import java.net.URISyntaxException; | 14 import java.net.URISyntaxException; |
17 import java.sql.Connection; | 15 import java.sql.*; |
18 import java.sql.Driver; | |
19 import java.sql.DriverManager; | |
20 import java.sql.DriverPropertyInfo; | |
21 import java.sql.SQLException; | |
22 import java.sql.SQLFeatureNotSupportedException; | |
23 import java.sql.Types; | |
24 import java.util.Map.Entry; | 16 import java.util.Map.Entry; |
25 import java.util.Properties; | 17 import java.util.Properties; |
26 | 18 |
27 /** | 19 /** |
28 *<pre> | 20 *<pre> |
68 * @param url the URL of the database | 60 * @param url the URL of the database |
69 * @return true if this driver understands the given URL; false otherwise | 61 * @return true if this driver understands the given URL; false otherwise |
70 */ | 62 */ |
71 @Override | 63 @Override |
72 public boolean acceptsURL(final String url) { | 64 public boolean acceptsURL(final String url) { |
73 if (url == null) | 65 if (url == null) |
74 return false; | 66 return false; |
75 if (url.startsWith("jdbc:monetdb:") || url.startsWith("jdbc:monetdbs:")) | 67 return url.startsWith("jdbc:monetdb:") || url.startsWith("jdbc:monetdbs:"); |
76 return true; | |
77 return false; | |
78 } | 68 } |
79 | 69 |
80 /** | 70 /** |
81 * Attempts to make a database connection to the given URL. The driver | 71 * Attempts to make a database connection to the given URL. The driver |
82 * should return "null" if it realizes it is the wrong kind of driver to | 72 * should return "null" if it realizes it is the wrong kind of driver to |