mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
feat: Adding missing methods to sqlite wrappers
This commit is contained in:
@@ -34,5 +34,30 @@ namespace ICD.Common.Utils.Sqlite
|
|||||||
{
|
{
|
||||||
return m_Reader.Read();
|
return m_Reader.Read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int GetInt32(int ordinal)
|
||||||
|
{
|
||||||
|
return m_Reader.GetInt32(ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool GetBoolean(int ordinal)
|
||||||
|
{
|
||||||
|
return m_Reader.GetBoolean(ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetString(int ordinal)
|
||||||
|
{
|
||||||
|
return m_Reader.GetString(ordinal);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetOrdinal(string name)
|
||||||
|
{
|
||||||
|
return m_Reader.GetOrdinal(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
m_Reader.Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,22 +6,27 @@ using Microsoft.Data.Sqlite;
|
|||||||
|
|
||||||
namespace ICD.Common.Utils.Sqlite
|
namespace ICD.Common.Utils.Sqlite
|
||||||
{
|
{
|
||||||
public sealed class IcdSqliteParameterCollection
|
public sealed class IcdSqliteParameterCollection
|
||||||
{
|
{
|
||||||
private readonly SqliteParameterCollection m_Parameters;
|
private readonly SqliteParameterCollection m_Parameters;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor.
|
/// Constructor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="commandParameters"></param>
|
/// <param name="commandParameters"></param>
|
||||||
public IcdSqliteParameterCollection(SqliteParameterCollection commandParameters)
|
public IcdSqliteParameterCollection(SqliteParameterCollection commandParameters)
|
||||||
{
|
{
|
||||||
m_Parameters = commandParameters;
|
m_Parameters = commandParameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IcdSqliteParameter Add(string name, eDbType type)
|
public IcdSqliteParameter Add(string name, eDbType type)
|
||||||
{
|
{
|
||||||
return new IcdSqliteParameter(m_Parameters.Add(name, type.ToParamType()));
|
return new IcdSqliteParameter(m_Parameters.Add(name, type.ToParamType()));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public void AddWithValue(string parameterName, object value)
|
||||||
|
{
|
||||||
|
m_Parameters.AddWithValue(parameterName, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user