java/jdbc-loopback-driver/src/main/java/info/globalcode/jdbc/loopback/Connection.java
author František Kučera <franta-hg@frantovo.cz>
Thu, 24 Oct 2019 21:43:08 +0200
branchv_0
changeset 250 aae5009bd0af
parent 237 7e08730da258
permissions -rw-r--r--
fix license version: GNU GPLv3
     1 /**
     2  * SQL-DK
     3  * Copyright © 2014 František Kučera (frantovo.cz)
     4  *
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, version 3 of the License.
     8  *
     9  * This program is distributed in the hope that it will be useful,
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  * GNU General Public License for more details.
    13  *
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
    16  */
    17 package info.globalcode.jdbc.loopback;
    18 
    19 import java.sql.SQLClientInfoException;
    20 import java.sql.SQLException;
    21 import java.sql.SQLWarning;
    22 import java.sql.Savepoint;
    23 import java.util.Map;
    24 import java.util.Properties;
    25 import java.util.concurrent.Executor;
    26 
    27 /**
    28  *
    29  * @author Ing. František Kučera (frantovo.cz)
    30  */
    31 public class Connection extends AbstractConnection {
    32 
    33 	private String url;
    34 	private Properties info;
    35 
    36 	public Connection(String url, Properties info) {
    37 		this.url = url;
    38 		this.info = info;
    39 	}
    40 
    41 	@Override
    42 	public java.sql.PreparedStatement prepareStatement(String sql) throws SQLException {
    43 		return new PreparedStatement();
    44 	}
    45 
    46 	@Override
    47 	public void setAutoCommit(boolean autoCommit) throws SQLException {
    48 	}
    49 
    50 	@Override
    51 	public boolean getAutoCommit() throws SQLException {
    52 		return true;
    53 	}
    54 
    55 	@Override
    56 	public void commit() throws SQLException {
    57 	}
    58 
    59 	@Override
    60 	public void rollback() throws SQLException {
    61 	}
    62 
    63 	@Override
    64 	public void close() throws SQLException {
    65 	}
    66 
    67 	@Override
    68 	public boolean isClosed() throws SQLException {
    69 		return false;
    70 	}
    71 
    72 	@Override
    73 	public void setReadOnly(boolean readOnly) throws SQLException {
    74 	}
    75 
    76 	@Override
    77 	public boolean isReadOnly() throws SQLException {
    78 		return true;
    79 	}
    80 
    81 	@Override
    82 	public void setCatalog(String catalog) throws SQLException {
    83 	}
    84 
    85 	@Override
    86 	public void setTransactionIsolation(int level) throws SQLException {
    87 	}
    88 
    89 	@Override
    90 	public SQLWarning getWarnings() throws SQLException {
    91 		return null;
    92 	}
    93 
    94 	@Override
    95 	public void clearWarnings() throws SQLException {
    96 	}
    97 
    98 	@Override
    99 	public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
   100 	}
   101 
   102 	@Override
   103 	public void setHoldability(int holdability) throws SQLException {
   104 	}
   105 
   106 	@Override
   107 	public void rollback(Savepoint savepoint) throws SQLException {
   108 	}
   109 
   110 	@Override
   111 	public void releaseSavepoint(Savepoint savepoint) throws SQLException {
   112 	}
   113 
   114 	@Override
   115 	public boolean isValid(int timeout) throws SQLException {
   116 		return true;
   117 	}
   118 
   119 	@Override
   120 	public void setClientInfo(String name, String value) throws SQLClientInfoException {
   121 	}
   122 
   123 	@Override
   124 	public void setClientInfo(Properties properties) throws SQLClientInfoException {
   125 	}
   126 
   127 	@Override
   128 	public void abort(Executor executor) throws SQLException {
   129 	}
   130 
   131 	@Override
   132 	public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
   133 	}
   134 }