view src/main/java/nl/cwi/monetdb/mcl/protocol/ServerResponses.java @ 120:02f560eb3cf2 embedded

Major change in the Datablock response. Removed the arrays creation in the Embedded connection, so it will run much faster now. It can be possible to do it as well in the MAPI connection, but in the way the Old Mapi Protocol is designed, it will be very complicated (ByteBuffers are designed to work with binary data instead of textual data :S). I think it's better to wait for the new protocol, which will be much faster and easier to parse.
author Pedro Ferreira <pedro.ferreira@monetdbsolutions.com>
date Tue, 28 Feb 2017 16:57:27 +0100 (2017-02-28)
parents 551093abca52
children 477c4de0eda2
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;

/**
 * This class represents the possible stages of a query response by the server.
 *
 * @author Fabian Groffen, Pedro Ferreira
 */
public final class ServerResponses {

    private ServerResponses() {}

    /* Please don't change the order or the values */

    /** "there is currently no line", or the the type is unknown is represented by UNKNOWN */
    public static final int UNKNOWN = 0;
    /** a line starting with ! indicates ERROR */
    public static final int ERROR = 1;
    /** a line starting with % indicates HEADER */
    public static final int HEADER = 2;
    /** a line starting with [ indicates RESULT */
    public static final int RESULT = 3;
    /** a line which matches the pattern of prompt1 is a PROMPT */
    public static final int PROMPT = 4;
    /** a line which matches the pattern of prompt2 is a MORE */
    public static final int MORE = 5;
    /** a line starting with &amp; indicates the start of a header block */
    public static final int SOHEADER = 6;
    /** a line starting with ^ indicates REDIRECT */
    public static final int REDIRECT = 7;
    /** a line starting with # indicates INFO */
    public static final int INFO = 8;
}