Package com.foundationdb.qp.rowtype

Examples of com.foundationdb.qp.rowtype.RowType


       
    }
   
    @Test
    public void cycleDecimalRows() throws IOException {
        RowType rowType = schema.newValuesType(MNumeric.INT.instance(false), MNumeric.DECIMAL.instance(11,0, false), MString.varchar());
        List<Row> rows = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            BigDecimal value = new BigDecimal (random.nextInt(100000));
            rows.add(row(rowType, random.nextInt(), value, characters(5+random.nextInt(10))));
            bindRows.add(BindableRow.of(rows.get(i)));
View Full Code Here


        compareRows (rows.toArray(rowArray), cursor);
    }
   
    @Test
    public void cycleBlobRows() throws IOException {
        RowType rowType = schema.newValuesType(MString.TEXT.instance(false), MString.TINYTEXT.instance(false));
        List<Row> rows = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            rows.add(row(rowType, characters(5+random.nextInt(100)), characters(5+random.nextInt(10))));
            bindRows.add(BindableRow.of(rows.get(i)));
        }
View Full Code Here

    protected static OperatorCreator insertCreator(final int tID, final Row newRow) {
        return new OperatorCreator() {
            @Override
            public Operator create(Schema schema) {
                RowType rowType = schema.tableRowType(tID);
                return insert_Returning(valuesScan_Default(bindableRows(newRow), rowType));
            }
        };
    }
View Full Code Here

    protected static OperatorCreator updateCreator(final int tID, final Row oldRow, final Row newRow) {
        return new OperatorCreator() {
            @Override
            public Operator create(Schema schema) {
                RowType rowType = schema.tableRowType(tID);
                return update_Returning(
                    valuesScan_Default(bindableRows(oldRow), rowType),
                    new UpdateFunction() {
                        @Override
                        public Row evaluate(Row original, QueryContext context, QueryBindings bindings) {
View Full Code Here

    protected static OperatorCreator deleteCreator(final int tID, final Row row) {
        return new OperatorCreator() {
            @Override
            public Operator create(Schema schema) {
                RowType rowType = schema.tableRowType(tID);
                return delete_Returning(valuesScan_Default(bindableRows(row), rowType), false);
            }
        };
    }
View Full Code Here

    protected List<Row> writeRows(Collection<Row> rows) {
        return writeRows(session(), rows);
    }

    protected List<Row> writeRows(Session session, Collection<Row> rows) {
        RowType lastRowType = null;
        List<Row> someRows = new ArrayList<>();
        List<Row> outputRows = new ArrayList<>();
        for(Row r : rows) {
            if(lastRowType != r.rowType()) {
                if(!someRows.isEmpty()) {
View Full Code Here

    }

    public Row row(Session session, int tableID, Object... fields) {
        AkibanInformationSchema ais = ais(session);
        Schema schema = SchemaCache.globalSchema(ais);
        RowType rowType = schema.tableRowType(tableID);
        return row(rowType, fields);
    }
View Full Code Here

    }

    public Row row(Index index, Object... fields) {
        AkibanInformationSchema ais = ais(session());
        Schema schema = SchemaCache.globalSchema(ais);
        RowType rowType = schema.indexRowType(index);
        return row(rowType, fields);
    }
View Full Code Here

            );
        }

        // RIGHT JOIN until the GI, and then the GI's join types

        RowType parentRowType = null;
        API.JoinType joinType = API.JoinType.RIGHT_JOIN;
        int branchStartDepth = branchTables.rootMost().table().getDepth() - 1;
        boolean withinBranch = branchStartDepth == -1;
        API.JoinType withinBranchJoin = operatorJoinType(groupIndex);
        result.incomingRowIsWithinGI = rowType.table().getDepth() >= branchTables.rootMost().table().getDepth();
View Full Code Here

    public IndexScan_FullText scanOperator(String query, int limit) {
        return scanOperator(parseQuery(query), limit);
    }
   
    public IndexScan_FullText scanOperator(FullTextQueryExpression query, int limit) {
        RowType rowType = null;
        if (buildContext != null)
            rowType = infos.searchRowType(buildContext.getSession(), indexName);
        return new IndexScan_FullText(indexName, query, limit, rowType);
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.qp.rowtype.RowType

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.