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

Feature - trigger functions #39

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

mattiarossi
Copy link

Refs #38 ,

  • implements trigger functions
  • added a test for checking correct generation
  • re-used decoration syntax used for volatility (//@plv8ify-trigger)

@mattiarossi mattiarossi changed the title Feature/38 trigger functions Feature - trigger functions Jan 3, 2024
Copy link
Owner

@divyenduz divyenduz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just added a nit-picky comment about the type name (not a blocker), will wait for your response on that before merging! Thanks for the contribution.

README.md Outdated
(Tip: you can add @types/pg and @types/plv8-internals to get all standard postgres types/defines and plv8 specific functions recognized by the type checker)

```
type testRow = {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a convention to call it testRow? How about just Row or TestRow (matching casing for types) or RowType?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a convention to call it testRow?

no, not at all, naming of the type is independent as it will only be used for type-checking in typescript. WHat matters is that the fields in the type match the table record names and types so that the trigger does not error out when run in plv8.
will change it to Row

@divyenduz divyenduz merged commit 52d6393 into divyenduz:main Jan 4, 2024
3 checks passed
@divyenduz
Copy link
Owner

Thanks for the contribution, this is live in 0.0.53

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

Successfully merging this pull request may close these issues.

2 participants