mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 03:57:32 +00:00
feat: Adding missing methods to sqlite wrappers
This commit is contained in:
parent
1460bf2924
commit
0bf88240b2
2 changed files with 37 additions and 7 deletions
|
|
@ -34,5 +34,30 @@ namespace ICD.Common.Utils.Sqlite
|
|||
{
|
||||
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
|
||||
{
|
||||
public sealed class IcdSqliteParameterCollection
|
||||
{
|
||||
private readonly SqliteParameterCollection m_Parameters;
|
||||
public sealed class IcdSqliteParameterCollection
|
||||
{
|
||||
private readonly SqliteParameterCollection m_Parameters;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
/// <param name="commandParameters"></param>
|
||||
public IcdSqliteParameterCollection(SqliteParameterCollection commandParameters)
|
||||
public IcdSqliteParameterCollection(SqliteParameterCollection commandParameters)
|
||||
{
|
||||
m_Parameters = commandParameters;
|
||||
}
|
||||
|
||||
public IcdSqliteParameter Add(string name, eDbType type)
|
||||
{
|
||||
{
|
||||
return new IcdSqliteParameter(m_Parameters.Add(name, type.ToParamType()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddWithValue(string parameterName, object value)
|
||||
{
|
||||
m_Parameters.AddWithValue(parameterName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue