Fixes
This commit is contained in:
parent
a487a8dadf
commit
67202d27f7
3 changed files with 7 additions and 4 deletions
|
@ -9,6 +9,7 @@ public class SQLiteConnection(NativeSQLiteConnection conn) : IDisposable {
|
|||
|
||||
public async Task<int> RunCommand(string command, params SQLiteParameter[] parameters) {
|
||||
using SQLiteCommand cmd = Connection.CreateCommand();
|
||||
cmd.Parameters.Clear();
|
||||
if(parameters?.Length > 0)
|
||||
cmd.Parameters.AddRange(parameters);
|
||||
cmd.CommandText = command;
|
||||
|
@ -17,6 +18,7 @@ public class SQLiteConnection(NativeSQLiteConnection conn) : IDisposable {
|
|||
|
||||
public async Task<DbDataReader?> RunQuery(string command, params SQLiteParameter[] parameters) {
|
||||
using SQLiteCommand cmd = Connection.CreateCommand();
|
||||
cmd.Parameters.Clear();
|
||||
if(parameters?.Length > 0)
|
||||
cmd.Parameters.AddRange(parameters);
|
||||
cmd.CommandText = command;
|
||||
|
@ -26,6 +28,7 @@ public class SQLiteConnection(NativeSQLiteConnection conn) : IDisposable {
|
|||
public async Task<T> RunQueryValue<T>(string command, params SQLiteParameter[] parameters)
|
||||
where T : struct {
|
||||
using SQLiteCommand cmd = Connection.CreateCommand();
|
||||
cmd.Parameters.Clear();
|
||||
if(parameters?.Length > 0)
|
||||
cmd.Parameters.AddRange(parameters);
|
||||
cmd.CommandText = command;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue