Commit Graph
45 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
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
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 28ca30f617 Made the LocalListChangesDatabase methods accept a cancellation token 2025-06-18 16:28:23 +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 a32a5acaed Added more docstrings 2025-06-17 18:01:12 +02:00
Carl Johnsen 0960a60462 IStorageHelper now implements IAsyncDisposable 2025-06-17 17:45:20 +02:00
Carl Johnsen 3d11a05400 Added .ConfigureAwait(false) to all of the await statements 2025-06-12 08:34:29 +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 0eba962fb9 Reintroduced helper function for constructing a LocalListChangesDatabase.StorageHelper 2025-05-21 15:45:18 +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 293e329a2d Restructured SQL queries in LocalListChangesDatabase 2025-05-20 08:03:12 +02:00
Carl Johnsen 9f7a82ff37 Made LocalListChangesDatabase async 2025-05-20 07:48:14 +02:00
Carl Johnsen 4db6d247f4 Removed FormatInvariant as it's now handled by the extension methods 2025-05-20 07:38:03 +02:00
Carl Johnsen def0be53d2 Purged IDb from LocalListChangesDatabase 2025-05-20 07:33:57 +02:00
Carl Johnsen 49663b9d55 Changed LocalListChangesDatabase to use factory construction 2025-05-20 07:25:12 +02:00
Kenneth Skovhede 183ee39d6e Fixed a bug in list-changes 2025-05-09 11:13:10 +02:00
Kenneth Skovhede 0a7a1cd689 Added option to set the SQLite page cache
This adds an extra option to allow setting the SQLite page cache size as a regular option.

Prior to this commit it was only possible to set the SQLite page cache size via environment variables.

The option to use environment variables is preserved, and as options from the environment variable are applied after the new setting, environment variables take precedence.

The default value for the new option is to use 1% of the system memory for the page cache. For the restore process, a connection per worker may be made which defaults to half the number of cores, so the maximum amount of memory is 1% * half the CPU cores.

This is just the upper limit, and SQLite may choose not to use all of it.

This fixes #6178
2025-04-22 14:26:46 +02:00
Kenneth Skovhede faede65d8d Changed transactions to use a wrapper that ensures a transaction is allocated. 2025-04-14 12:04:00 +02:00
Kenneth Skovhede 0ed672ff33 Fixed missing @Type parameter 2025-04-03 22:33:09 +02:00
Kenneth Skovhede 0638afb8b8 Fixed some nullable support 2025-04-03 15:25:20 +02:00
Kenneth Skovhede b0cab485ef Added LocalListChangesDatabase 2025-04-02 14:32:39 +02:00
Kenneth Skovhede bb1aa8e1f7 Cosmetic cleanup
Removed superfluous namespaces.
Using `var` most places.
Using extension methods for common setup of commands.
2025-03-14 14:34:56 +01:00
Kenneth Skovhede 7234d43961 Fixed all SQL strings to use interpolation and forced them into the FormattableString handler using the invariant formatting. 2025-03-14 12:13:17 +01:00
Kenneth Skovhede f342d70819 Implemented forced invariant locale on all SQL strings.
This fixes #6023
2025-03-13 23:06:32 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Jojo-1000 e316944a50 Fix compare on linux showing 0 bytes when exclude filters are used.
Closes #5229
2024-06-10 16:00:39 +02:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu afab61a05b Use pattern matching to simplify casts. 2019-10-19 10:15:38 -07:00
Kenneth Hsu f12858e6a5 Mark fields that shouldn't be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be
reassigned outside the constructor.
2018-05-25 10:04:52 -07:00
Kenneth SkovhedeandGitHub 1df44989d2 Update LocalListChangesDatabase.cs
Fixed issue with filters and ListCchanges / Compare
2017-10-03 11:08:43 +02:00
Kenneth Skovhede fd14c1649b Fixed the query used to search for files.
This fixes #2471
2017-05-17 11:00:43 +02:00
Kenneth Skovhede 742eab0913 Fixed multiple cases where connections and command instances were not disposed.
This should fix all cases of "File is locked" on windows.
2016-04-06 20:40:34 +02:00
Kenneth Skovhede d2f4dac74a Fixed issues with filtering/selecting files on case-insensitive filesystems.
This closes #1461.
2015-09-15 19:29:58 +02:00
Kenneth Skovhede 4846ffa103 Now using the file modification timestamp and the filesize as indicators that trigger file scanning.
This fixes #1099.
2015-01-24 21:59:53 +01:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00
Kenneth Skovhede 4c217b57d9 Fixed a number of dispose errors that would mask real errors 2013-08-23 23:36:25 +02:00
Kenneth Skovhede a229de8e23 Cleaned up some output with Backup and compacting.
Implemented better output for Restore.
Fixed a problem with errors during dispose, and a problem with selecting filesets that do not exist.
Fixed a bug with restore if a file existed with some correct data, a copy would be restored with partial data.
Added check to try to avoid excessive restores of the same files if a file in another version already exists.
2013-08-22 20:56:03 +02:00
Kenneth Skovhede b69cdcb136 Fixed filters to include everything if empty.
Will now include by default if there are only exclude filters.
If there are any include filters, the files are excluded by default.
2013-06-30 12:42:13 +02:00
Kenneth Skovhede 2bf912a0af Rewrote the filter system to distinguish between match and result, which allows filter combinations 2013-06-29 12:16:30 +02:00
Kenneth Skovhede e36fa0c441 Implemented list-changes 2013-06-20 20:17:10 +02:00