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

codjo-database - Génération des scripts de trigger #18

Closed
codjo opened this issue May 30, 2014 · 0 comments
Closed

codjo-database - Génération des scripts de trigger #18

codjo opened this issue May 30, 2014 · 0 comments

Comments

@codjo
Copy link
Owner

codjo commented May 30, 2014

Publish Date2008/09/19Byferry

La classe `DatabaseScriptHelper` permet maintenant de créer des scripts de trigger (_drop_, _create_ et _log_) sous Sybase. Ces méthodes sont utilisées principalement dans `datagen`.

Exemple : drop de TR_AP_TOTO_I"

import static com.agf.database.common.util.SqlTrigger.triggerNamed;

...

databaseScriptHelper.buildDropTriggerScript(triggerNamed("TR_AP_TOTO_I"));

Exemple : create de TR_AP_TOTO_I"

import static com.agf.database.common.util.SqlTrigger.insertTrigger;
import static com.agf.database.common.util.SqlTable.tableNamed;

...

databaseScriptHelper.buildCreateTriggerScript(insertTrigger("TR_AP_TOTO_I",
                                                            tableNamed("AP_TOTO"),
                                                            "// CUSTOM SQL CODE")));

Exemple : log de TR_AP_TOTO_I"

import static com.agf.database.common.util.SqlTrigger.triggerNamed;

...

databaseScriptHelper.buildLogTriggerCreationScript(triggerNamed("TR_AP_TOTO_I"));
@codjo codjo closed this as completed May 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant