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

fix(torii-core): update entity timestamp on update #2118

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

Larkooo
Copy link
Collaborator

@Larkooo Larkooo commented Jun 28, 2024

Description

#2117

@@ -169,8 +169,8 @@ impl Sql {
let keys_str = felts_sql_string(&keys);
let insert_entities = "INSERT INTO entities (id, keys, event_id, executed_at) VALUES (?, \
?, ?, ?) ON CONFLICT(id) DO UPDATE SET \
executed_at=EXCLUDED.executed_at, event_id=EXCLUDED.event_id \
RETURNING *";
updated_at=CURRENT_TIMESTAMP, executed_at=EXCLUDED.executed_at, \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it the only location where we should do this fix? Don't we also update them on change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We update them on change there too. We do an upsert which is what the ON CONFLICT is for

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.34%. Comparing base (2ea37a1) to head (158a4ec).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2118   +/-   ##
=======================================
  Coverage   68.34%   68.34%           
=======================================
  Files         331      331           
  Lines       41443    41443           
=======================================
  Hits        28323    28323           
  Misses      13120    13120           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Larkooo Larkooo merged commit 622d241 into dojoengine:main Jun 28, 2024
15 checks passed
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