Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for { CREATE | DROP } TRIGGER commands #6956

Closed
32 tasks done
Tracked by #10528
lukaseder opened this issue Dec 27, 2017 · 4 comments
Closed
32 tasks done
Tracked by #10528

Add support for { CREATE | DROP } TRIGGER commands #6956

lukaseder opened this issue Dec 27, 2017 · 4 comments

Comments

@lukaseder
Copy link
Member

lukaseder commented Dec 27, 2017

Now that we support BEGIN .. END style blocks (#6474), and hopefully soon also other procedural language elements (#6475), we should definitely add support for triggers as well.

Tasks

  • Add DDL support
  • Parser support
  • Dialect support (more dialects here: Add support for { CREATE | DROP } TRIGGER commands in more dialects #11989)
    • Db2
    • Firebird
    • HSQLDB
    • MariaDB
    • MySQL
    • Oracle
      • We must execute these commands as STATIC_STATEMENT in Oracle, to support the :OLD syntax, to prevent Oracle from thinking this is an actual bind variable 🙄
    • SQL Server
  • Emulations
    • OR REPLACE
    • WHEN can be emulated simply, by moving the predicate into the trigger body as an IF statement
    • REFERENCING
      • Some dialects don't support default aliases (e.g. Db2). We can auto-generate REFERENCING OLD AS OLD NEW AS NEW in those cases for better standardisation
    • INSERT OR UPDATE OR DELETE Could be emulated by splitting the trigger into separate triggers, but let's not do that for now.
    • INSTEAD OF cannot be emulated
    • UPDATE OF cannote be emulated

Tasks from separate issues:

Out of scope features:

References:


See also:
https://stackoverflow.com/q/47969132/521799

@timur-sh

This comment has been minimized.

@lukaseder

This comment has been minimized.

@lukaseder lukaseder moved this from To do to In progress in 3.14 More procedural support Jan 15, 2021
@lukaseder lukaseder changed the title Add support for CREATE TRIGGER and DROP TRIGGER commands Add support for { ALTER | CREATE | DROP } TRIGGER commands Jan 15, 2021
@lukaseder
Copy link
Member Author

This will ship in jOOQ 3.15

lukaseder added a commit that referenced this issue Jan 15, 2021
- Added DSL (CREATE, DROP)
- Added parser support (DROP)
- Added simple integration tests
lukaseder added a commit that referenced this issue Jan 15, 2021
- Added DSL (CREATE, DROP)
- Added parser support (DROP)
- Added simple integration tests
lukaseder added a commit that referenced this issue Jan 15, 2021
- Added DSL (CREATE, DROP)
- Added parser support (DROP)
- Added simple integration tests
lukaseder added a commit that referenced this issue Jan 18, 2021
lukaseder added a commit that referenced this issue Jan 18, 2021
- Added MariaDB annotations
- Test workarounds for missing REFERENCING clause support
lukaseder added a commit that referenced this issue Jan 18, 2021
- Added Support annotations
- Test workarounds for missing REFERENCING clause support
- Support parsing SQL Server syntax
- Added support for FOR EACH STATEMENT
@lukaseder lukaseder changed the title Add support for { ALTER | CREATE | DROP } TRIGGER commands Add support for { CREATE | DROP } TRIGGER commands Jan 27, 2021
lukaseder added a commit that referenced this issue Jan 27, 2021
This includes:

- [#8230] Add support for RAISE or SIGNAL in the procedural API
- [#6956] Add support HSQLDB CREATE TRIGGER
lukaseder added a commit that referenced this issue Feb 2, 2021
This includes:

- [#11348] BooleanDataKey.DATA_FORCE_STATIC_STATEMENT only
forces inlining of bind values, not static statement execution
lukaseder added a commit that referenced this issue Feb 4, 2021
@lukaseder
Copy link
Member Author

More dialects will be supported in a future release: #11989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants