All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yandex.ydb.examples.simple.DataQueryResults Maven / Gradle / Ivy

There is a newer version: 1.10.8
Show newest version
package com.yandex.ydb.examples.simple;

import com.yandex.ydb.examples.TablePrinter;
import com.yandex.ydb.table.query.DataQueryResult;


/**
 * @author Sergey Polovko
 */
public class DataQueryResults {

    static void print(DataQueryResult result) {
        if (result.isEmpty()) {
            System.out.println("results ");
            return;
        }

        System.out.println("result txId: " + result.getTxId());

        for (int i = 0; i < result.getResultSetCount(); i++) {
            System.out.printf("-- [ result set #%d ] --\n", i);
            new TablePrinter(result.getResultSet(i)).print();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy