From cd480fbd2b280339966d46a4119a8d62baa91f3d Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 14 Aug 2012 09:54:28 -0500 Subject: [PATCH] HHH-7472 - Introduce a "schema management" service --- .../java/org/hibernate/dialect/Dialect.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java index 650db2cfc8..8ccf2219b2 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java @@ -1844,6 +1844,28 @@ public abstract class Dialect implements ConversionContext { // DDL support ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + /** + * Get the SQL command used to create the named schema + * + * @param schemaName The name of the schema to be created. + * + * @return The creation command + */ + public String getCreateSchemaCommand(String schemaName) { + return "create schema " + schemaName; + } + + /** + * Get the SQL command used to drop the named schema + * + * @param schemaName The name of the schema to be dropped. + * + * @return The drop command + */ + public String getDropSchemaCommand(String schemaName) { + return "drop schema " + schemaName; + } + /** * Does this dialect support the ALTER TABLE syntax? *