static Schema createSchema(SqlgGraph sqlgGraph, Topology topology, String name) { Schema schema = new Schema(topology, name); Preconditions.checkArgument(!name.equals(SQLG_SCHEMA) && !sqlgGraph.getSqlDialect().getPublicSchema().equals(name), "createSchema may not be called for 'sqlg_schema' or 'public'"); schema.createSchemaOnDb(); TopologyManager.addSchema(sqlgGraph, name); schema.committed = false; return schema; }
static Schema createSchema(SqlgGraph sqlgGraph, Topology topology, String name) { Schema schema = new Schema(topology, name); Preconditions.checkArgument(!name.equals(SQLG_SCHEMA) && !sqlgGraph.getSqlDialect().getPublicSchema().equals(name), "createSchema may not be called for 'sqlg_schema' or 'public'"); schema.createSchemaOnDb(); TopologyManager.addSchema(sqlgGraph, name); schema.committed = false; return schema; }
/** * Creates the 'public' schema that always already exist and is pre-loaded in {@link Topology()} @see {@link Topology#cacheTopology()} * * @param publicSchemaName The 'public' schema's name. Sometimes its upper case (Hsqldb) sometimes lower (Postgresql) * @param topology The {@link Topology} that contains the public schema. * @return The Schema that represents 'public' */ static Schema createPublicSchema(SqlgGraph sqlgGraph, Topology topology, String publicSchemaName) { Schema schema = new Schema(topology, publicSchemaName); if (!existPublicSchema(sqlgGraph)) { schema.createSchemaOnDb(); } schema.committed = false; return schema; }
/** * Creates the 'public' schema that always already exist and is pre-loaded in {@link Topology()} @see {@link Topology#cacheTopology()} * * @param publicSchemaName The 'public' schema's name. Sometimes its upper case (Hsqldb) sometimes lower (Postgresql) * @param topology The {@link Topology} that contains the public schema. * @return The Schema that represents 'public' */ static Schema createPublicSchema(SqlgGraph sqlgGraph, Topology topology, String publicSchemaName) { Schema schema = new Schema(topology, publicSchemaName); if (!existPublicSchema(sqlgGraph)) { schema.createSchemaOnDb(); } schema.committed = false; return schema; }