Mercurial > hg > monetdb-java
view src/main/java/nl/cwi/monetdb/mcl/protocol/AbstractProtocol.java @ 95:c9db0fdbfc53 embedded
Some documentation done, plus removed unnecessary instance variables.
author | Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> |
---|---|
date | Fri, 06 Jan 2017 18:59:30 +0000 (2017-01-06) |
parents | 6f74e01c57da |
children | 4a93f75c72c9 |
line wrap: on
line source
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright 1997 - July 2008 CWI, August 2008 - 2017 MonetDB B.V. */ package nl.cwi.monetdb.mcl.protocol; import nl.cwi.monetdb.jdbc.MonetConnection; import nl.cwi.monetdb.mcl.responses.AutoCommitResponse; import nl.cwi.monetdb.mcl.responses.SchemaResponse; import nl.cwi.monetdb.mcl.responses.UpdateResponse; import nl.cwi.monetdb.mcl.responses.DataBlockResponse; import nl.cwi.monetdb.mcl.responses.ResultSetResponse; import java.io.IOException; import java.util.Map; public abstract class AbstractProtocol { public abstract void waitUntilPrompt() throws IOException; public abstract void fetchNextResponseData() throws IOException; public abstract ServerResponses getCurrentServerResponseHeader(); public abstract StarterHeaders getNextStarterHeader(); public abstract ResultSetResponse getNextResultSetResponse(MonetConnection con, MonetConnection.ResponseList list, int seqnr) throws ProtocolException; public abstract UpdateResponse getNextUpdateResponse() throws ProtocolException; public SchemaResponse getNextSchemaResponse() { return new SchemaResponse(); } public abstract AutoCommitResponse getNextAutoCommitResponse() throws ProtocolException; public abstract DataBlockResponse getNextDatablockResponse(Map<Integer, ResultSetResponse> rsresponses) throws ProtocolException; public abstract TableResultHeaders getNextTableHeader(String[] columnNames, int[] columnLengths, String[] types, String[] tableNames) throws ProtocolException; public abstract int parseTupleLines(int firstLineNumber, int[] typesMap, Object[] values, boolean[][] nulls) throws ProtocolException; public abstract String getRemainingStringLine(int startIndex); public abstract void writeNextQuery(String prefix, String query, String suffix) throws IOException; }