Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.Schema


                                   CreateSchemaNode createSchema,
                                   QueryContext context)
    {
        final String schemaName = createSchema.getSchemaName();

        Schema curSchema = ais.getSchema(schemaName);
        if((curSchema != null) &&
           skipOrThrow(context, createSchema.getExistenceCheck(), curSchema, new DuplicateSchemaException(schemaName))) {
            return;
        }
View Full Code Here


            QueryContext context)
    {
        AkibanInformationSchema ais = ddlFunctions.getAIS(session);
        final String schemaName = dropSchema.getSchemaName();

        Schema curSchema = ais.getSchema(schemaName);
        if((curSchema == null) &&
           skipOrThrow(context, dropSchema.getExistenceCheck(), curSchema, new NoSuchSchemaException(schemaName))) {
            return;
        }
        // 1 == RESTRICT, meaning no drop if the schema isn't empty
View Full Code Here

        else {
            for (TableName constraintName : constraints) {
                String schemaName = constraintName.getSchemaName();
                if (schemaName == null)
                    schemaName = server.getDefaultSchemaName();
                Schema schema = server.getAIS().getSchema(schemaName);
                if (schema == null)
                    throw new NoSuchSchemaException(schemaName);
                ForeignKey foreignKey = null;
                for (Table table : schema.getTables().values()) {
                    ForeignKey tfk = table.getReferencingForeignKey(constraintName.getTableName());
                    if (tfk != null) {
                        if (foreignKey == null)
                            foreignKey = tfk;
                    }
View Full Code Here

            }

            @Override
            public Row next() {
                while(it.hasNext()) {
                    Schema schema = it.next();
                    if(isAccessible(session, schema.getName())) {
                        return new ValuesRow(rowType,
                                            null,        // catalog
                                             schema.getName(),
                                             null,              // owner
                                             null,null, null,   // default charset catalog/schema/name
                                             null,              // sql path
                                             null,null, null,   // default charset catalog/schema/name
                                             ++rowCounter /*hidden pk*/);
View Full Code Here

            final Table table = ais.getTable(schema, name);
            assertNotNull(schema + "." + name + " in AIS", table);
            expected.add(name);
        }
        final SortedSet<String> actual = new TreeSet<>();
        Schema schemaObj = ais.getSchema(schema);
        if(schemaObj != null) {
            actual.addAll(schemaObj.getTables().keySet());
        }
        assertEquals("tables in: " + schema, expected, actual);
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.ais.model.Schema

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.