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

Bug: @action modifier not inserting any data #405

Closed
KwilLuke opened this issue Nov 30, 2023 · 2 comments · Fixed by #409
Closed

Bug: @action modifier not inserting any data #405

KwilLuke opened this issue Nov 30, 2023 · 2 comments · Fixed by #409
Labels
bug Something isn't working
Milestone

Comments

@KwilLuke
Copy link
Contributor

Currently the @action modifier is not inserting the action name into the database.

On this query (ignore the column names, I was using a different schema for testing), I execute:

action add_record ($id, $value, $created_at) public {
  INSERT INTO prices (id, date_value, value, created_at)
  VALUES ($id, @action, $value, $created_at);
}

And receive this value in the table:

| created_at | date_value |                  id                  | value |
+------------+------------+--------------------------------------+-------+
|         64 | <nil>      | 18d9e0c2-42d2-471e-bd33-f56d5239852c |  3111 |

Currently, @action is listed as a supported feature for the next release.

Question: Should this be fixed before the next release, or should we remove this as a feature in the upcoming release?

@KwilLuke KwilLuke added the bug Something isn't working label Nov 30, 2023
@KwilLuke
Copy link
Contributor Author

Update: It looks like the issue is that in execution, it is referenced as '@procedure`. See here.

But Kuneiform is not configured to recognize @procedure, so if I try to add that to the schema, the Kuneiform validation fails.

@jchappelow
Copy link
Member

I suppose the fix is just this: b629696

But I was wondering why there's no test that would catch it, and I don't think I see the use case for @action, but it does seem to be error prone if it really refers to the entry action (not the actual action containing it if nested calls). What's a sensible use case that might go in test-db.kf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants