Skip to content

Commit 777ca62

Browse files
committed
Use tuple instead of creating class TableInfo
1 parent c0d134e commit 777ca62

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

Editor/SQLiteAssetEditor.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,6 @@ namespace SQLite.Editor
2929
[CanEditMultipleObjects]
3030
public class SQLiteAssetEditor : UnityEditor.Editor
3131
{
32-
private class TableInfo
33-
{
34-
public string Name { get; set; }
35-
public string Sql { get; set; }
36-
37-
public void Deconstruct(out string name, out string sql)
38-
{
39-
name = Name;
40-
sql = Sql;
41-
}
42-
}
43-
4432
[SerializeField] private List<string> _expandedTables = new List<string>();
4533

4634
public override void OnInspectorGUI()
@@ -63,7 +51,7 @@ public override void OnInspectorGUI()
6351
{
6452
EditorGUILayout.LabelField("Tables", EditorStyles.boldLabel);
6553
EditorGUI.indentLevel++;
66-
foreach ((string name, string sql) in db.Query<TableInfo>("SELECT name, sql FROM SQLite_schema WHERE type = 'table'"))
54+
foreach ((string name, string sql) in db.Query<(string, string)>("SELECT name, sql FROM SQLite_schema WHERE type = 'table'"))
6755
{
6856
bool previouslyExpanded = _expandedTables.Contains(name);
6957
bool expanded = EditorGUILayout.Foldout(previouslyExpanded, name, true);

0 commit comments

Comments
 (0)