Package com.foundationdb.ais.model.aisb2

Examples of com.foundationdb.ais.model.aisb2.NewAISBuilder.groupIndex()


    }
   
    @Test
    public void caoiWithGroupIndex() {
        NewAISBuilder builder = CAOIBuilderFiller.createAndFillBuilder(SCHEMA);
        builder.groupIndex("iprice_odate", Index.JoinType.RIGHT).
                on(CAOIBuilderFiller.ITEM_TABLE, "unit_price").
                and(CAOIBuilderFiller.ORDER_TABLE, "order_date");
       
        final AkibanInformationSchema inAIS = builder.ais();
        final AkibanInformationSchema outAIS = writeAndRead(inAIS);
View Full Code Here


        final String PARENT_PK_TREENAME = "bar";
        final String GROUP_INDEX_TREENAME = "zap";
        NewAISBuilder builder = AISBBasedBuilder.create(SCHEMA, typesTranslator());
        builder.table("parent").colInt("pid", false).colString("v", 32).pk("pid").key("v", "v");
        builder.table("child").colInt("cid", false).colInt("pid").pk("pid").joinTo("parent").on("pid", "pid");
        builder.groupIndex("v_cid", Index.JoinType.LEFT).on("parent", "v").and("child", "cid");

        AkibanInformationSchema inAIS = builder.ais();
        Table inParent = inAIS.getTable(SCHEMA, "parent");
        inParent.getGroup().setStorageDescription(new TestStorageDescription(inParent.getGroup(), GROUP_TREENAME, identifier));
        inParent.getGroup().getIndex("v_cid").setStorageDescription(new TestStorageDescription(inParent.getGroup().getIndex("v_cid"), GROUP_INDEX_TREENAME, identifier));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.