Mercurial > hg > monetdb-java
view src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiServerResponseParser.java @ 67:87ba760038b6 embedded
More cleanup. About to start the tuple conversions.
author | Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> |
---|---|
date | Tue, 06 Dec 2016 18:13:54 +0100 (2016-12-06) |
parents | 7307caacc2d5 |
children | 17365ed26611 |
line wrap: on
line source
package nl.cwi.monetdb.mcl.protocol.oldmapi; import nl.cwi.monetdb.mcl.protocol.ServerResponses; /** * Created by ferreira on 11/30/16. */ final class OldMapiServerResponseParser { static ServerResponses ParseOldMapiServerResponse(OldMapiProtocol protocol) { ServerResponses res; switch (protocol.builder.charAt(protocol.currentPointer)) { case '!': res = ServerResponses.ERROR; break; case '&': res = ServerResponses.SOHEADER; break; case '%': res = ServerResponses.HEADER; break; case '[': res = ServerResponses.RESULT; break; case '=': res = ServerResponses.RESULT; break; case '^': res = ServerResponses.REDIRECT; break; case '#': res = ServerResponses.INFO; break; case '.': res = ServerResponses.PROMPT; break; case ',': res = ServerResponses.MORE; break; default: res = ServerResponses.UNKNOWN; } return res; } }