Package org.hsqldb

Examples of org.hsqldb.ColumnBase


    static public int getTableOidForColumn(int colIndex, ResultMetaData md) {
        if (!md.isTableColumn(colIndex)) {
            return 0;
        }
        ColumnBase col = md.columns[colIndex];
        int hashCode = (col.getSchemaNameString() + '.'
            + col.getTableNameString()).hashCode();
        if (hashCode < 0) {
            hashCode *= -1;
        }
        return hashCode;
    }
View Full Code Here


        meta.colIndexes   = new int[] {
            -1, -1
        };
        meta.columns      = new ColumnBase[2];

        ColumnBase column = new ColumnBase("", "", "", "");

        column.setType(types[0]);

        meta.columns[0] = column;
        column          = new ColumnBase("", "", "", "");

        column.setType(types[1]);

        meta.columns[1] = column;

        RowSetNavigatorClient navigator = new RowSetNavigatorClient();
View Full Code Here

                    String catalog = in.readString();
                    String schema  = in.readString();
                    String table   = in.readString();
                    String name    = in.readString();
                    ColumnBase column = new ColumnBase(catalog, schema, table,
                                                       name);

                    column.setType(columnTypes[i]);
                    decodeTableColumnAttrs(in.readByte(), column);

                    columns[i] = column;
                }
View Full Code Here

            case RESULT_METADATA : {
                out.writeInt(extendedColumnCount);

                for (int i = 0; i < extendedColumnCount; i++) {
                    if (columnTypes[i] == null) {
                        ColumnBase column = columns[i];

                        columnTypes[i] = column.getDataType();
                    }

                    writeDataType(out, columnTypes[i]);
                }

                for (int i = 0; i < columnCount; i++) {
                    ColumnBase column = columns[i];

                    out.writeString(columnLabels[i]);
                    out.writeString(column.getCatalogNameString());
                    out.writeString(column.getSchemaNameString());
                    out.writeString(column.getTableNameString());
                    out.writeString(column.getNameString());
                    out.writeByte(encodeTableColumnAttrs(column));
                }

                if (columnCount != extendedColumnCount) {
                    for (int i = 0; i < colIndexes.length; i++) {
View Full Code Here

    public static Result newSingleColumnResult(String colName, Type type) {

        Result result = newResult(ResultConstants.DATA);

        result.metaData            = ResultMetaData.newResultMetaData(1);
        result.metaData.columns[0] = new ColumnBase(null, null, null, colName);

        result.metaData.columns[0].setType(type);
        result.metaData.prepareData();

        //
View Full Code Here

    }

    public static JDBCResultSet newEptyResultSet() {
        ResultMetaData md = ResultMetaData.newResultMetaData(1);

        ColumnBase column =
            new ColumnBase(null, null, null, "C1");
        column.setType(Type.SQL_INTEGER);
        md.columnTypes[0] = Type.SQL_INTEGER;

        md.columns[0] = column;

        Result r = Result.newSingleColumnResult(md);
View Full Code Here

            -1, -1
        };
        meta.columns      = new ColumnBase[2];

        for (int i = 0; i < meta.columns.length; i++) {
            ColumnBase column = new ColumnBase("", "", "", "");

            column.setType(types[i]);

            meta.columns[i] = column;
        }

        RowSetNavigatorClient navigator = new RowSetNavigatorClient();
View Full Code Here

        meta.colIndexes   = new int[] {
            -1, -1
        };
        meta.columns      = new ColumnBase[2];

        ColumnBase column = new ColumnBase("", "", "", "");

        column.setType(types[0]);

        meta.columns[0] = column;
        column          = new ColumnBase("", "", "", "");

        column.setType(types[1]);

        meta.columns[1] = column;

        RowSetNavigatorClient navigator = new RowSetNavigatorClient();
View Full Code Here

    public static ResultMetaData newSingleColumnMetaData(String colName) {

        ResultMetaData md = ResultMetaData.newResultMetaData(1);

        md.columns[0] = new ColumnBase(null, null, null, colName);

        md.columns[0].setType(Type.SQL_VARCHAR_DEFAULT);
        md.prepareData();

        return md;
View Full Code Here

                    String catalog = in.readString();
                    String schema  = in.readString();
                    String table   = in.readString();
                    String name    = in.readString();
                    ColumnBase column = new ColumnBase(catalog, schema, table,
                                                       name);

                    column.setType(columnTypes[i]);
                    decodeTableColumnAttrs(in.readByte(), column);

                    columns[i] = column;
                }
View Full Code Here

TOP

Related Classes of org.hsqldb.ColumnBase

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.