Fixed QueryResult.Reader being null
This commit is contained in:
parent
408c1efc5b
commit
e55b1964fb
1 changed files with 4 additions and 0 deletions
|
|
@ -157,10 +157,14 @@ namespace TShockAPI.DB
|
||||||
|
|
||||||
public bool Read()
|
public bool Read()
|
||||||
{
|
{
|
||||||
|
if (Reader == null)
|
||||||
|
return false;
|
||||||
return Reader.Read();
|
return Reader.Read();
|
||||||
}
|
}
|
||||||
public T Get<T>(string column)
|
public T Get<T>(string column)
|
||||||
{
|
{
|
||||||
|
if (Reader == null)
|
||||||
|
return default(T);
|
||||||
return Reader.Get<T>(Reader.GetOrdinal(column));
|
return Reader.Get<T>(Reader.GetOrdinal(column));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue