Package com.foundationdb.sql.pg.PostgresJsonCompiler

Examples of com.foundationdb.sql.pg.PostgresJsonCompiler.JsonResultColumn


            throws IOException {
        encoder.appendString("{");
        AkibanAppender appender = encoder.getAppender();
        int ncols = resultColumns.size();
        for (int i = 0; i < ncols; i++) {
            JsonResultColumn resultColumn = resultColumns.get(i);
            encoder.appendString((i == 0) ? "\"" : ",\"");
            Quote.DOUBLE_QUOTE.append(appender, resultColumn.getName());
            encoder.appendString("\":");
            ValueSource value = row.value(i);
            TInstance columnTInstance = resultColumn.getType();
            if (columnTInstance.typeClass() instanceof AkResultSet) {
                outputNestedResultSet((Cursor)value.getObject(),
                                      resultColumn.getNestedResultColumns());
            }
            else {
                FormatOptions options = context.getServer().getFormatOptions();
                columnTInstance.formatAsJson(value, appender, options);
            }
View Full Code Here

TOP

Related Classes of com.foundationdb.sql.pg.PostgresJsonCompiler.JsonResultColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.