what the fuck?
This commit is contained in:
parent
278041d688
commit
624f96e104
|
@ -83,13 +83,14 @@ public class Database
|
|||
var table = query?.TableName;
|
||||
var key = query?.Key;
|
||||
var value = query?.Value;
|
||||
var newValue = query?.NewValue;
|
||||
|
||||
var tableToReturn = _tables.Find(x => x.Name == table);
|
||||
var row = tableToReturn?.Rows?.FirstOrDefault(x => x.Columns?.FirstOrDefault(y => y.Name == key)?.Name == key);
|
||||
var row = tableToReturn?.Rows?.FirstOrDefault(x => x.Columns?.FirstOrDefault(y => y.Name == key)?.Value == value);
|
||||
var column = row?.Columns?.FirstOrDefault(x => x.Name == key);
|
||||
|
||||
if (column != null)
|
||||
column.Value = value;
|
||||
column.Value = newValue;
|
||||
|
||||
Save();
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@ public class SetQuery : Query
|
|||
public string TableName { get; set; }
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
public string NewValue { get; set; }
|
||||
}
|
Loading…
Reference in New Issue