Skip to content

[9.0] MySQL._update returns rowcount#8209

Merged
fstagni merged 2 commits into
DIRACGrid:integrationfrom
chaen:v9.0_fix_updateMySQL
Jun 2, 2025
Merged

[9.0] MySQL._update returns rowcount#8209
fstagni merged 2 commits into
DIRACGrid:integrationfrom
chaen:v9.0_fix_updateMySQL

Conversation

@chaen

@chaen chaen commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@fstagni

fstagni commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

For info, where would this be useful/needed?

@andresailer

Copy link
Copy Markdown
Contributor
- NEW: MySQL._update returns rowcount
+ NEW: MySQL._update returns `rowCount` as an entry in the returned dictionary

Would also be good to update the docstring for this function.

@chaen chaen force-pushed the v9.0_fix_updateMySQL branch from fbc2e21 to 33068eb Compare June 2, 2025 08:47
@chaen

chaen commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

For info, where would this be useful/needed?

Anywhere you want to know how many rows were updated. And I need it in an LHCbDIRAC MR

@chrisburr

Copy link
Copy Markdown
Member

This is a hard thing to emulate in the DiracX compatibility layer.

@chaen

chaen commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

This is a hard thing to emulate in the DiracX compatibility layer.

It anyway will probably be interesting to move to direct DB access for all this

@chaen chaen marked this pull request as draft June 2, 2025 09:42
@chaen chaen force-pushed the v9.0_fix_updateMySQL branch from 33068eb to 4f335e3 Compare June 2, 2025 12:38
@chaen

chaen commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

In fact, looking at the low level mysql code, (and after at the DIRAC comments), the value I was after is already in res["Value"]...

@chaen chaen marked this pull request as ready for review June 2, 2025 12:50
@fstagni fstagni merged commit 22d538a into DIRACGrid:integration Jun 2, 2025
24 checks passed
@DIRACGridBot DIRACGridBot added the sweep:ignore Prevent sweeping from being ran for this PR label Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweep:ignore Prevent sweeping from being ran for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants