Package com.foundationdb.ais.model.aisb2

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


        AkibanInformationSchema inAIS = builder.unvalidatedAIS();
        Column idColumn = inAIS.getTable(new TableName (SCHEMA, "customers")).getColumn(0);
        idColumn.setDefaultIdentity(true);
        idColumn.setIdentityGenerator(inAIS.getSequence(sequenceName));
       
        AkibanInformationSchema outAIS = writeAndRead(builder.ais());
       
        assertNotNull(outAIS.getSequence(sequenceName));
        Column outColumn = outAIS.getTable(new TableName(SCHEMA, "customers")).getColumn(0);
        assertNotNull (outColumn.getDefaultIdentity());
        assertTrue (outColumn.getDefaultIdentity());
View Full Code Here


            .paramDoubleOut("d")
            .externalName("myjar", "com.acme.Procs", "proc1")
            .sqlAllowed(Routine.SQLAllowed.READS_SQL_DATA)
            .dynamicResultSets(2);
       
        AkibanInformationSchema inAIS = builder.ais();
        AkibanInformationSchema outAIS = writeAndRead(inAIS);

        Routine proc = outAIS.getRoutine(SCHEMA, "PROC1");
        assertNotNull(proc);
       
View Full Code Here

        NewAISBuilder builder = AISBBasedBuilder.create(SCHEMA, typesTranslator());
        builder.procedure("PROC2")
            .language("java", Routine.CallingConvention.LOADABLE_PLAN)
            .externalName("com.acme.Procs", "proc1");
       
        AkibanInformationSchema inAIS = builder.ais();
        AkibanInformationSchema outAIS = writeAndRead(inAIS);

        Routine proc = outAIS.getRoutine(SCHEMA, "PROC2");
       
        assertEquals("java", proc.getLanguage());
View Full Code Here

        TypesTranslator typesTranslator = MTypesTranslator.INSTANCE;
        NewAISBuilder aisBuilder = AISBBasedBuilder.create(SCHEMA, typesTranslator);
        NewTableBuilder tableBuilder = aisBuilder.table(TABLE).colInt("pkid");
        tableMaker.make(tableBuilder);
        tableBuilder.pk("pkid");
        AkibanInformationSchema ais = aisBuilder.ais();
        Table table = ais.getTable(SCHEMA, TABLE);
        table.setTableId(1);
        new SchemaFactory().buildRowDefs(ais);
        rowDef = ais.getTable(SCHEMA, TABLE).rowDef();
        this.fields = Arrays.copyOf(fields, fields.length);
View Full Code Here

            .language("java", Routine.CallingConvention.JAVA)
            .paramStringIn("jar", PATH_MAX)
            .paramLongIn("undeploy")
            .externalName(SQLJJarRoutines.class.getCanonicalName(), "remove");

        Collection<Routine> procs = aisb.ais().getRoutines().values();
        for (Routine proc : procs) {
            schemaManager.registerSystemRoutine(proc);
        }
    }
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.