You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Jun Li <al...@gmail.com> on 2006/04/21 02:46:20 UTC

What kind of sql will I get from platform.getAlterTablesSql?

If I use platform.getAlterTablesSql against two xml schemas, what kind of
sql will I get?
I mean for SQL Server, Oracle or other DBs, some implementations are
different, such as for the PK auto-increment. I think it's better, if there
is way to define what sort of sql will be generated.


--
--------------
Cheers,
Jun

Re: What kind of sql will I get from platform.getAlterTablesSql?

Posted by Jun Li <al...@gmail.com>.
Yes, you are right. I need a platform to get those sql not just a database
model which can be read in from xml. This also means that I can't get sql of
the differences between two xml schemas, have to create a live database from
xml, and then get the sql from the platform. Is that right?
Can we go one step further, to get the sql (whatever type supported) from
two xml schemas straight away?

On 4/21/06, Thomas Dudziak <to...@gmail.com> wrote:
>
> On 4/21/06, Jun Li <al...@gmail.com> wrote:
>
> Well, if you use it via the API, then you already have a specific
> platform, e.g. the Oracle platform or the DB2 platform, and thus
> you'll get the SQL for this platform.
> And if you use it via the Ant task, then you have to specify the
> platform via a corresponding attribute (databaseType at the task),
> otherwise you'll get an error.
>
> Tom
>



--
--------------
Cheers,
Jun

Re: What kind of sql will I get from platform.getAlterTablesSql?

Posted by Thomas Dudziak <to...@gmail.com>.
On 4/21/06, Jun Li <al...@gmail.com> wrote:

> If I use platform.getAlterTablesSql against two xml schemas, what kind of
> sql will I get?
> I mean for SQL Server, Oracle or other DBs, some implementations are
> different, such as for the PK auto-increment. I think it's better, if there
> is way to define what sort of sql will be generated.

Well, if you use it via the API, then you already have a specific
platform, e.g. the Oracle platform or the DB2 platform, and thus
you'll get the SQL for this platform.
And if you use it via the Ant task, then you have to specify the
platform via a corresponding attribute (databaseType at the task),
otherwise you'll get an error.

Tom