diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-09-28 10:21:44 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-09-28 10:21:44 -0500 |
| commit | 1d4a478aa2b52a042592bca506b629ca249f9f63 (patch) | |
| tree | 48423ea17073c5204cdcae484cd449592754309f /src/slskd/Common/SqliteConnectionExtensions.cs | |
| parent | db7866c9b0cae53c53ba4d16f52a1653df646265 (diff) | |
| download | slskd-1d4a478aa2b52a042592bca506b629ca249f9f63.tar.gz | |
refactor sqlite backup
Diffstat (limited to 'src/slskd/Common/SqliteConnectionExtensions.cs')
| -rw-r--r-- | src/slskd/Common/SqliteConnectionExtensions.cs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/slskd/Common/SqliteConnectionExtensions.cs b/src/slskd/Common/SqliteConnectionExtensions.cs deleted file mode 100644 index 3944c10b..00000000 --- a/src/slskd/Common/SqliteConnectionExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -// <copyright file="SqliteConnectionExtensions.cs" company="slskd Team"> -// Copyright (c) slskd Team. All rights reserved. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published -// by the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see https://www.gnu.org/licenses/. -// </copyright> - -namespace slskd -{ - using System; - using Microsoft.Data.Sqlite; - - public static class SqliteConnectionExtensions - { - public static int ExecuteNonQuery(this SqliteConnection conn, string query, Action<SqliteCommand> action = null) - { - using var cmd = new SqliteCommand(query, conn); - action?.Invoke(cmd); - return cmd.ExecuteNonQuery(); - } - } -} |
