@Test public void createSchemaEmpty () throws Exception { String sql = "CREATE SCHEMA EMPTY"; AkibanInformationSchema ais = new AkibanInformationSchema(); StatementNode stmt = parser.parseStatement(sql); assertTrue (stmt instanceof CreateSchemaNode); SchemaDDL.createSchema(ais, null, (CreateSchemaNode)stmt, null); }
public static void createSchema (AkibanInformationSchema ais, String defaultSchemaName, 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; } }
SchemaDDL { public static void createSchema (AkibanInformationSchema ais, String defaultSchemaName, 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; } } }
SchemaDDL { public static void createSchema (AkibanInformationSchema ais, String defaultSchemaName, 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; } } private  SchemaDDL(); }
SchemaDDL { public static void createSchema (AkibanInformationSchema ais, String defaultSchemaName, 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; } } private  SchemaDDL(); static void createSchema(AkibanInformationSchema ais,
                                   String defaultSchemaName,
                                   CreateSchemaNode createSchema,
                                   QueryContext context); static void dropSchema(DDLFunctions ddlFunctions,
            Session session,
            DropSchemaNode dropSchema,
            QueryContext context); }
SchemaDDL { public static void createSchema (AkibanInformationSchema ais, String defaultSchemaName, 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; } } private  SchemaDDL(); static void createSchema(AkibanInformationSchema ais,
                                   String defaultSchemaName,
                                   CreateSchemaNode createSchema,
                                   QueryContext context); static void dropSchema(DDLFunctions ddlFunctions,
            Session session,
            DropSchemaNode dropSchema,
            QueryContext context);  }