empire-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele <doeb...@esteam.de>
Subject AW: dropping a database
Date Mon, 19 Aug 2013 08:37:51 GMT
Hi Harald,

Sorry for the late answer, but better late than never ;-)

yes, this getDDLScript(...) method is intended for getting the drop command (which could as
well be a sequence of commands)

Second: for HSql it should generate "DROP SCHEMA MYDBNAME;". We have changed DDL generation
a while ago - you might not have the latest version of Empire-db.
The USER is probably a copy and paste bug from Oracle. In Oracle a USER essentially owns a
schema which is what we call a database.

Please check whether you really use the HSql driver (DBDatabaseDriverHSql) and your Empire-db


from: Harald Kirsch [mailto:Harald.Kirsch@raytion.com] 
to: user@empire-db.apache.org
re: Re: dropping a database

Ok, I thought I found it:

getDriver().getDDLScript(DBCmdType.DROP, myDbObject, script)

but this generates


The 'USER' is hard coded, as it seems and my hunch is it should rather be DATABASE. Why should
I drop a USER when providing a DBDatabase object?


On 15.08.2013 14:56, Harald Kirsch wrote:
> Hi all,
> in DBDDLGenerator I find dropDatabase(), but it is protected. 
> Similarly it is still protected in the specific implementations like 
> MySQLDDLGenerator.
> Of course I could just derive from the driver and call the protected 
> method, but this seems to be a bit odd. What would be the correct way 
> to drop a database with empireDB?
> Regards,
> Harald.

Harald Kirsch
Raytion GmbH
Kaiser-Friedrich-Ring 74
40547 Duesseldorf
Fon +49-211-550266-0
Fax +49-211-550266-19

View raw message