Teeny changes
This commit is contained in:
parent
25ec0452a4
commit
232c5a5421
|
@ -58,11 +58,6 @@ public class Database
|
||||||
Save();
|
Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string GetRowsJson(Row[]? rows)
|
|
||||||
{
|
|
||||||
return JsonConvert.SerializeObject(new { Rows = rows });
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetValue(GetQuery? query)
|
public string GetValue(GetQuery? query)
|
||||||
{
|
{
|
||||||
Console.WriteLine(_tables.Count.ToString().Pastel("#ff0000"));
|
Console.WriteLine(_tables.Count.ToString().Pastel("#ff0000"));
|
||||||
|
@ -79,7 +74,7 @@ public class Database
|
||||||
var tableToReturn = _tables.Find(x => x.Name == table);
|
var tableToReturn = _tables.Find(x => x.Name == table);
|
||||||
var rows = tableToReturn?.Rows?.Where(x => x.Columns?.FirstOrDefault(y => y.Name == colName)?.Value == value).ToArray();
|
var rows = tableToReturn?.Rows?.Where(x => x.Columns?.FirstOrDefault(y => y.Name == colName)?.Value == value).ToArray();
|
||||||
|
|
||||||
return GetRowsJson(rows);
|
return JsonConvert.SerializeObject(rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Loop()
|
public static void Loop()
|
||||||
|
|
Loading…
Reference in New Issue