当前位置: 首页>>代码示例>>Java>>正文


Java RowSetNavigatorClient.add方法代码示例

本文整理汇总了Java中org.hsqldb.navigator.RowSetNavigatorClient.add方法的典型用法代码示例。如果您正苦于以下问题:Java RowSetNavigatorClient.add方法的具体用法?Java RowSetNavigatorClient.add怎么用?Java RowSetNavigatorClient.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hsqldb.navigator.RowSetNavigatorClient的用法示例。


在下文中一共展示了RowSetNavigatorClient.add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getInsertValuesNavigator

import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertValuesNavigator(Session session) {

        Type[] colTypes = baseTable.getColumnTypes();

        //
        Expression[]          list    = insertExpression.nodes;
        RowSetNavigatorClient newData = new RowSetNavigatorClient(list.length);

        for (int j = 0; j < list.length; j++) {
            Expression[] rowArgs = list[j].nodes;
            Object[]     data    = getInsertData(session, colTypes, rowArgs);

            newData.add(data);
        }

        return newData;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:StatementInsert.java

示例2: getInsertSelectNavigator

import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertSelectNavigator(Session session) {

        Type[] colTypes  = baseTable.getColumnTypes();
        int[]  columnMap = insertColumnMap;

        //
        Result          result      = queryExpression.getResult(session, 0);
        RowSetNavigator nav         = result.initialiseNavigator();
        Type[]          sourceTypes = result.metaData.columnTypes;
        RowSetNavigatorClient newData =
            new RowSetNavigatorClient(nav.getSize());

        while (nav.hasNext()) {
            Object[] data       = baseTable.getNewRowData(session);
            Object[] sourceData = nav.getNext();

            for (int i = 0; i < columnMap.length; i++) {
                int j = columnMap[i];

                if (j == this.overrideUserValue) {
                    continue;
                }

                Type sourceType = sourceTypes[i];

                data[j] = colTypes[j].convertToType(session, sourceData[i],
                                                    sourceType);
            }

            newData.add(data);
        }

        return newData;
    }
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:35,代码来源:StatementInsert.java

示例3: getInsertSelectNavigator

import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertSelectNavigator(Session session) {

        Type[] colTypes  = baseTable.getColumnTypes();
        int[]  columnMap = insertColumnMap;

        //
        Result                result = queryExpression.getResult(session, 0);
        RowSetNavigator       nav         = result.initialiseNavigator();
        Type[]                sourceTypes = result.metaData.columnTypes;
        RowSetNavigatorClient newData     = new RowSetNavigatorClient(2);

        while (nav.hasNext()) {
            Object[] data       = baseTable.getNewRowData(session);
            Object[] sourceData = (Object[]) nav.getNext();

            for (int i = 0; i < columnMap.length; i++) {
                int  j          = columnMap[i];
                Type sourceType = sourceTypes[i];

                data[j] = colTypes[j].convertToType(session, sourceData[i],
                                                    sourceType);
            }

            newData.add(data);
        }

        return newData;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:29,代码来源:StatementInsert.java

示例4: getInsertValuesNavigator

import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertValuesNavigator(Session session) {

        Type[] colTypes  = baseTable.getColumnTypes();
        int[]  columnMap = insertColumnMap;

        //
        Expression[]          list    = insertExpression.nodes;
        RowSetNavigatorClient newData = new RowSetNavigatorClient(list.length);

        for (int j = 0; j < list.length; j++) {
            Expression[] rowArgs = list[j].nodes;
            Object[]     data    = baseTable.getNewRowData(session);

            session.sessionData.startRowProcessing();

            for (int i = 0; i < rowArgs.length; i++) {
                Expression e        = rowArgs[i];
                int        colIndex = columnMap[i];

                if (e.getType() == OpTypes.DEFAULT) {
                    if (baseTable.identityColumn == colIndex) {
                        continue;
                    }

                    data[colIndex] =
                        baseTable.colDefaults[colIndex].getValue(session);

                    continue;
                }

                data[colIndex] = colTypes[colIndex].convertToType(session,
                        e.getValue(session), e.getDataType());
            }

            newData.add(data);
        }

        return newData;
    }
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:40,代码来源:StatementInsert.java

示例5: getInsertSelectNavigator

import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
RowSetNavigator getInsertSelectNavigator(Session session) {

        Type[] colTypes  = baseTable.getColumnTypes();
        int[]  columnMap = insertColumnMap;

        //
        Result                result = queryExpression.getResult(session, 0);
        RowSetNavigator       nav         = result.initialiseNavigator();
        Type[]                sourceTypes = result.metaData.columnTypes;
        RowSetNavigatorClient newData     = new RowSetNavigatorClient(2);

        while (nav.hasNext()) {
            Object[] data       = baseTable.getNewRowData(session);
            Object[] sourceData = (Object[]) nav.getNext();

            for (int i = 0; i < columnMap.length; i++) {
                int j = columnMap[i];

                if (j == this.overrideUserValue) {
                    continue;
                }

                Type sourceType = sourceTypes[i];

                data[j] = colTypes[j].convertToType(session, sourceData[i],
                                                    sourceType);
            }

            newData.add(data);
        }

        return newData;
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:34,代码来源:StatementInsert.java

示例6: newColumnResult

import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
private Result newColumnResult(long position,
                               int count) throws SQLException {

    if (!JDBCClobClient.isInLimits(data.length, position, count)) {
        throw JDBCUtil.outOfRangeArgument();
    }

    Type[] types = new Type[2];

    types[0] = Type.SQL_INTEGER;
    types[1] = elementType;

    ResultMetaData meta = ResultMetaData.newSimpleResultMetaData(types);

    meta.columnLabels = new String[] {
        "C1", "C2"
    };
    meta.colIndexes   = new int[] {
        -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();

    for (int i = (int) position; i < position + count; i++) {
        Object[] rowData = new Object[2];

        rowData[0] = Integer.valueOf(i + 1);
        rowData[1] = data[i];

        navigator.add(rowData);
    }

    Result result = Result.newDataResult(meta);

    result.setNavigator(navigator);

    return result;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:48,代码来源:JDBCArrayBasic.java

示例7: newColumnResult

import org.hsqldb.navigator.RowSetNavigatorClient; //导入方法依赖的package包/类
private Result newColumnResult(long position,
                               int count) throws SQLException {

    if (!JDBCClobClient.isInLimits(data.length, position, count)) {
        throw Util.outOfRangeArgument();
    }

    Type[] types = new Type[2];

    types[0] = Type.SQL_INTEGER;
    types[1] = elementType;

    ResultMetaData meta = ResultMetaData.newSimpleResultMetaData(types);

    meta.columnLabels = new String[] {
        "C1", "C2"
    };
    meta.colIndexes   = new int[] {
        -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();

    for (int i = (int) position; i < position + count; i++) {
        Object[] rowData = new Object[2];

        rowData[0] = Integer.valueOf(i + 1);
        rowData[1] = data[i];

        navigator.add(rowData);
    }

    Result result = Result.newDataResult(meta);

    result.setNavigator(navigator);

    return result;
}
 
开发者ID:RabadanLab,项目名称:Pegasus,代码行数:48,代码来源:JDBCArrayBasic.java


注:本文中的org.hsqldb.navigator.RowSetNavigatorClient.add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。