I have implemented the following clauses for jOOQ's TRUNCATE statement:

- CASCADE | RESTRICT (supported by Postgres only) [1]
- RESTART IDENTITY | CONTINUE IDENTITY (supported by HSQLDB and Postgres)
[2]

This will be included in jOOQ 3.1

Cheers
Lukas

[1]: https://github.com/jOOQ/jOOQ/issues/2357
[2]: https://github.com/jOOQ/jOOQ/issues/2355


2013/3/29 Lukas Eder <[email protected]>

> Hello Peter,
>
> You're right, that could be added, indeed. I have added feature
> request #2357 for this [1]
>
> In Postgres 9.2 [2], There are a couple of other additions to the
> "standard" syntax, namely:
>
> - Multi-table truncations: This could be simulated by executing batch
> statements in other databases. I've added feature request #2355 for
> this [3]
> - "ONLY": Exclude descendant tables, whatever that means (I guess,
> table inheritance?)
> - "RESTART IDENTITY" / "CONTINUE IDENTITY": Whether to restart
> sequences of truncated tables. I've added feature request #2355 for
> this [4]
>
> [1]: https://github.com/jOOQ/jOOQ/issues/2357
> [2]: http://www.postgresql.org/docs/9.2/static/sql-truncate.html
> [3]: https://github.com/jOOQ/jOOQ/issues/2356
> [4]: https://github.com/jOOQ/jOOQ/issues/2355
>
> These improvements can probably be implemented in jOOQ 3.1
>
> Cheers
> Lukas
>
> 2013/3/28 Peter Ertl <[email protected]>:
> > Especially for setting up / tearing down test fixtures in unit tests
> having
> > support for the postgresl specific 'cascade' option would make things a
> lot
> > easier.
> >
> > It will truncate a table and delete all foreign key dependencies to the
> > table as well.
> >
> > http://www.postgresql.org/docs/8.2/static/sql-truncate.html
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "jOOQ User Group" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to