Commit Graph
304 Commits
Author SHA1 Message Date
Kenneth Skovhede 230d80642a Fixed invariant formatting helpers
This fixes an issue with formatting for invariant values that was caused by incrorrect function overload selection.

To avoid future issues, the two similar functions have been renamed to clarify what they are working for.
2025-09-25 11:14:54 +02:00
Kenneth Skovhede f0d8677ef5 Include duplicated blocks in recreated index files
This fixes #6504
2025-09-23 11:12:36 +02:00
Carl Johnsen 7670ea9a58 Ensured that all values that are passed to interpolation strings have been passed through FormatInvariant to prevent SQLite errors related to string formatting cultures. 2025-09-05 14:11:05 +02:00
Carl Johnsen b3fe276a13 Ensured that all temporary tables uset the same type of generated guid name 2025-09-05 14:06:55 +02:00
Kenneth Skovhede 429bcd1f2d Include deleted blocks when recreating dindex files.
This fixes #6339
2025-07-11 15:55:36 +02:00
Carl Johnsen 0a047a37e3 SQL query inside GetEmptyMetadataBlocksetId had not only moved files, but had also changed 2025-06-19 13:20:44 +02:00
Carl Johnsen f6ac30e831 Merge remote-tracking branch 'upstream/master' into performance/mssqlite-async 2025-06-19 12:17:30 +02:00
Carl Johnsen 2412800c0c Removed the sqlite page cache option. It should be set through the environment variable, or some other way of providing a custom database configurotion 2025-06-19 11:41:39 +02:00
Carl Johnsen 3b3a7801b8 Made the LocalDatabase methods accept a cancellation token 2025-06-18 15:36:10 +02:00
Carl Johnsen bc97eaf71b Removed redundant calls to a SqliteCommand.Parameters.Clear() 2025-06-18 12:06:20 +02:00
Carl Johnsen 9ac583db94 Made all relevant using statements use await to use DisposeAsync 2025-06-18 11:53:11 +02:00
Carl Johnsen 859b65054d Simplified using statements that uses databases or accesses their methods 2025-06-18 11:52:05 +02:00
Carl Johnsen f221098c28 Formatted SQL queries - mainly adding double quotes where they were missing. 2025-06-18 10:42:08 +02:00
Carl Johnsen 8814fdebcc Added more docstrings 2025-06-17 15:13:33 +02:00
Carl Johnsen 1f97832546 Classes implementing DisposeAsync should also implement the interface 2025-06-17 15:11:25 +02:00
Kenneth Skovhede 2c5c01160c Added a check and repair for empty metadata
This PR adds a check for empty metadatasets (length = 0) and replaces such sets with a default metadataset.

This fixes #6350
2025-06-16 16:35:07 +02:00
Carl Johnsen 3d11a05400 Added .ConfigureAwait(false) to all of the await statements 2025-06-12 08:34:29 +02:00
Carl Johnsen e5337e4d26 Formatted SQL queries 2025-06-11 12:09:58 +02:00
Carl Johnsen 09251284ab Removed TODOs 2025-06-11 11:07:54 +02:00
Carl Johnsen f373880c5a Renamed ExpandInClauseParameterAsync, as one of them isn't actually async.
Postfix mssqlite has been added as well to not clash with the IDb implementation
2025-06-11 10:47:40 +02:00
Carl Johnsen 66ed9600b8 Removed unused synchronous helper method 2025-06-11 07:38:24 +02:00
Carl Johnsen 73c8471f8e Made BlocklistHashEnumerable and the code using it async 2025-06-11 07:37:22 +02:00
Carl Johnsen 23509a27eb Disposing the database disposes the reusable transaction and creates it's own transaction for PRAGMA optimize 2025-06-05 09:15:17 +02:00
Carl Johnsen 507087df1d Calling close on the connection, as that calls the backend directly, and not through the IDb interface 2025-06-05 09:13:40 +02:00
Carl Johnsen 85e6f45338 Moved some of the commits to transactions outside of database methods, as this more closely mimics the commit flow of the old IDb backend.
This was especially needed due to the Microsoft.Data.Sqlite backend not supporting nested transactions.
2025-06-03 21:44:55 +02:00
Carl Johnsen caa3c13dbe Post master merge fixes 2025-06-02 11:50:35 +02:00
Carl Johnsen 04ffb4fb42 Fixed incorrectly merged changes in LocalDatabase 2025-06-02 09:16:25 +02:00
Carl Johnsen ee40767412 Merge branch 'master' into performance/mssqlite-async 2025-05-27 12:04:50 +02:00
Kenneth Skovhede 721e497e69 Fixed nullability warnings 2025-05-23 11:46:37 +02:00
Carl Johnsen d27dec0a2f Updated methods to use the instance ReusableTransacition instead of starting a new one 2025-05-23 08:26:06 +02:00
Carl Johnsen abc7c79841 Dispose made infinite recursion between different class derivations 2025-05-23 08:20:00 +02:00
Carl Johnsen afa468377b Fixed typo 2025-05-22 15:28:46 +02:00
Carl Johnsen 6c7e67dd28 Post master merge fixes 2025-05-22 14:35:15 +02:00
Carl Johnsen a37f0dda31 Merge branch 'master' into performance/mssqlite-async 2025-05-22 14:09:17 +02:00
Carl Johnsen 22550be73c SQLite parameters are case sensitive. 2025-05-22 13:34:29 +02:00
Carl Johnsen c5248e007f Construction chain of databases wrongfully tried to start multiple transactions 2025-05-22 13:33:10 +02:00
Carl Johnsen 2cd1692532 Temporary fix to distinguish between new and legacy extension method 2025-05-22 13:25:42 +02:00
Carl Johnsen afddb93e5d Async method wasn't awaited 2025-05-22 08:26:32 +02:00
Carl Johnsen f8f0fd39af Removed comments 2025-05-22 08:03:32 +02:00
Carl Johnsen 9c0f2ca980 LocalDatabase.Dispose() wasn't calling the database correctly with the ReusableTransaction 2025-05-22 08:01:45 +02:00
Carl Johnsen 2c408d795f LocalDatabase always starts a new ReusableTransaction 2025-05-22 08:01:16 +02:00
Carl Johnsen 58fc35e9fd Changed LocalDatabase.GetFilesetIDs to return an async enumerable, rather than a task containing an enumerable. 2025-05-21 15:56:59 +02:00
Carl Johnsen edf1d93f56 Removed transactions as arguments as part of the transition to implicit transactions 2025-05-21 10:08:06 +02:00
Carl Johnsen d11b4e58e7 Reworked the factory construction chains to forward an instantiated object where applicable 2025-05-21 07:24:36 +02:00
Carl Johnsen 4ca147d0f1 More preliminary work towards implicit reusable transaction 2025-05-20 16:27:07 +02:00
Kenneth Skovhede 32646eb159 Added fix for handling rename failures with filesets.
Fixed an issue with the test not counting number of uploads correctly.
2025-05-20 15:22:13 +02:00
Carl Johnsen 9c4eb5a222 FilteredFilenameTable.CreateAsync wasn't static 2025-05-20 08:26:32 +02:00
Carl Johnsen 3e3a9b5aa9 More SQL query restructuring 2025-05-20 06:07:45 +02:00
Carl Johnsen 88db9676b4 Restructured SQL queries in LocalDeleteDatabase and made everything async where applicable 2025-05-19 21:51:28 +02:00
Carl Johnsen f3f00faf8e Incorrectly called the synchronous version of a function 2025-05-19 15:45:31 +02:00