Commit Graph
58 Commits
Author SHA1 Message Date
Carl Johnsen 344d3dcb5b The new backend requires a value to be set 2025-05-22 15:28:14 +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 21a9f0036c Reintroduced legacy database methods for non-main operation calls to be able to function. 2025-05-22 13:23:27 +02:00
Carl Johnsen 75c77bdaa6 Fixed async method not being async 2025-05-20 07:08:01 +02:00
Carl Johnsen c848ca6819 Added more extension methods as they're required by LocalBackupDatabase 2025-05-19 15:43:21 +02:00
Carl Johnsen ae12d63468 Changed TemporaryDbValueList to use factory construction and to be proper async. 2025-05-19 14:27:01 +02:00
Carl Johnsen d4c56ec9ef Changed TemporaryDbValueList from IDb to Microsoft.Data.Sqlite 2025-05-19 13:49:14 +02:00
Carl Johnsen ab6b2a64c9 Added the extension method to pass ReusableTransactions directly on SqliteCommands 2025-05-19 10:37:37 +02:00
Carl Johnsen 2de3f1d5b5 Reintroduced the synchronous CreateCommand extension method 2025-05-16 12:38:02 +02:00
Carl Johnsen 84b50e5db8 Added the SetTransaction extension method.
The main use is to ensure that the given transaction parameter is not null.
Maybe it will be performing more checks in the future.
2025-05-16 12:23:46 +02:00
Carl Johnsen 6782597791 Moved FormatInvariant to inner function and restructured chain of calls when executing commands. 2025-05-16 12:21:56 +02:00
Carl Johnsen 2817f05c93 First WIP changes to extension methods 2025-05-16 12:21:56 +02:00
Carl Johnsen e00218feb6 Removed whitespace 2025-05-16 12:21:56 +02:00
Kenneth Skovhede c3fe98c09c Disable the begin immediate as it seems the library does it automatically 2025-04-14 22:57:44 +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 35682bd4fe Cleaned up some nullability issues 2025-04-03 14:20:00 +02:00
Kenneth Skovhede e96e769ba6 Removed support for positional arguments in extension methods 2025-04-03 13:59:39 +02:00
Kenneth Skovhede 9e3aa72d00 Added LocalBackupDatabase 2025-04-03 11:31:36 +02:00
Kenneth Skovhede 7b948a2f1d Fixed issue with SQLite bindings not supporting arrays.
Added helper class to wrap values in a temporary table if they exceeed the maximum number of parameters.
2025-04-02 23:26:20 +02:00
Kenneth Skovhede 53a1d2a723 Added LocalListBrokenFilesDatabase 2025-04-02 14:06:06 +02:00
Kenneth Skovhede bf1ef0e794 Fixed nullability warnings 2025-03-24 10:31:52 +01:00
Kenneth Skovhede fe1cef3be8 Move away from positional parameters in SQL statements.
This is a move away from using positional parameters in SQL statements and rok towards only using named parameters.
2025-03-18 22:41:11 +01: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 be16323f24 General cleanup, common database validation exception 2025-03-10 14:38:45 +01:00
Kenneth SkovhedeandGitHub 6bbd64a655 Fixed nullability warnings in Utility.cs (#5861)
* Fixed nullability warnings in `Utility.cs`

* Fixed a number of nullability issues and warnings

* More nullable fixes

* Fixed the overwrite issue

* Fixed additional nullability issues

* Removed additional nullability issues

* More nullability fixes and added some xmldoc

* Added more xmldocs and removed an unused argument

* Removed more warnings
2025-01-14 14:03:48 +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
Carl Johnsen 0cd9374bed Added comments and docstrings 2024-11-22 15:26:04 +01:00
Carl Johnsen 878780dfe4 Added Database.ExecuteReaderEnumerable for prepared statements 2024-11-19 10:32:54 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
Kenneth Hsu 13e1f0dac6 Remove unused Database members. 2020-03-14 16:45:08 -07:00
Kenneth Hsu 3551238000 Remove redundant calls to String.Format. 2020-01-25 17:07:02 -08:00
Kenneth SkovhedeandGitHub 64201ae706 Merge pull request #3314 from mnaiman/log_sql_variables
Log sql variables
2018-08-07 23:32:27 +02:00
Kenneth Skovhede 3831962c82 Fixed an infinite recursion issue 2018-08-07 13:35:30 +02:00
Kenneth Skovhede e9d7c47602 Disabled logging block and file database access to reduce overhead in these queries.
Added an option to explicitly re-enable logging of the database queries (`--profile-all-database-queries`)
2018-08-07 09:40:43 +02:00
Max123456 99bb089b8b log variables even in release 2018-07-06 19:44:05 +02:00
Max123456 af5e2119c0 typo 2018-07-06 19:41:25 +02:00
Kenneth Skovhede 79f7b22e0f Merge branch 'master' into concurrent_processing
Changed a few things on the way, removing the log process

# Conflicts:
#	Duplicati/Library/Main/Controller.cs
#	Duplicati/Library/Main/Database/ExtensionMethods.cs
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/FilelistProcessor.cs
#	Duplicati/Library/Main/Operation/PurgeBrokenFilesHandler.cs
#	Duplicati/Library/Main/Operation/TestFilterHandler.cs
#	Duplicati/Library/Main/Options.cs
#	Duplicati/Library/Main/ResultClasses.cs
#	Duplicati/UnitTest/BasicSetupHelper.cs
2018-04-11 23:02:47 +02:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Kenneth Skovhede a49f63d82c Removed a number of unwanted translations for debug code 2018-02-11 20:46:44 +01:00
Kenneth Skovhede d18431b385 Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Controller.cs
#	Duplicati/Library/Main/Database/ExtensionMethods.cs
#	Duplicati/Library/Main/Database/LocalBackupDatabase.cs
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
#	Duplicati/Library/Main/ResultClasses.cs

First attempt at merging all changes from 2016-10-08 to now :/
2017-05-30 00:35:31 +02:00
Dan Stahr 27c9e15875 Improved database performance and logging
- Don't use Vacuum() just before PurgeLogData (which performs vacuum() already)
 - Removed unncessary poorly performning query (after optimizing it I found out it's unused)
 - Correctly log calls for ExecuteScalarInt64
2017-03-23 15:22:58 +00:00
tianqiaoxiangzhe b05c5b4efd defaultvalue is not used
defaultvalue is not used
2016-12-01 09:52:30 +08:00
Kenneth Skovhede f0c0fc3a2e Merge branch 'master' into concurrent_processing
# Conflicts:
#	Duplicati/Library/Main/Database/LocalDatabase.cs
#	Duplicati/Library/Main/Duplicati.Library.Main.csproj
#	Duplicati/Library/Main/Operation/BackupHandler.cs
#	thirdparty/CoCoL/CoCoL.dll
2016-08-08 15:03:42 +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 430acb6a07 Merge branch 'master' into concurrent_processing 2016-03-13 14:23:28 +01:00
FootStark 150dac30e8 Enable ExecPlans for commands with parameters 2016-02-27 21:59:25 +01:00
Kenneth Skovhede 0eba4bf098 Improved debugging for sql commands 2016-02-24 23:45:32 +01:00
FootStark 07ef6b754e Update ExtensionMethods.cs 2016-02-18 19:33:08 +01:00
Kenneth Skovhede 0a375e2ceb Improved readability slightly 2015-02-04 21:44:03 +01:00
Kenneth Skovhede 60389b1e6e Added extra consistency check to detect the missing file issue related to issue #1214. 2015-02-03 23:47:33 +01:00