BEMServer / bemserver-core

https://bemserver-docs.readthedocs.io/
MIT License
3 stars 3 forks source link

Fix bulk insert: don't use fixed VALUES clause #208

Closed lafrech closed 1 year ago

lafrech commented 1 year ago

Passing parameters separate from the insert object invokes bulk insert mode, which optimized the operation.

This also avoids a crash when passing more than 65535 values.

See

I checked generated queries and reproduced the 65535 values issue to check this modification fixes it. I didn't keep the test because it was too long to execute.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01% :warning:

Comparison is base (a888703) 95.79% compared to head (e548310) 95.78%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #208 +/- ## ========================================== - Coverage 95.79% 95.78% -0.01% ========================================== Files 42 42 Lines 2708 2707 -1 Branches 339 339 ========================================== - Hits 2594 2593 -1 Misses 90 90 Partials 24 24 ``` | [Files Changed](https://app.codecov.io/gh/BEMServer/bemserver-core/pull/208?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BEMServer) | Coverage Δ | | |---|---|---| | [bemserver\_core/input\_output/timeseries\_data\_io.py](https://app.codecov.io/gh/BEMServer/bemserver-core/pull/208?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BEMServer#diff-YmVtc2VydmVyX2NvcmUvaW5wdXRfb3V0cHV0L3RpbWVzZXJpZXNfZGF0YV9pby5weQ==) | `99.13% <100.00%> (-0.01%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.