Teeny changes

This commit is contained in:
j4ck 2022-06-03 00:04:46 +03:00
parent 25ec0452a4
commit 232c5a5421
1 changed files with 2 additions and 7 deletions

View File

@ -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()