Antigravity 초안
This commit is contained in:
23
ExcelKv.Core/SchemaRegistry.cs
Normal file
23
ExcelKv.Core/SchemaRegistry.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ExcelKv.Core;
|
||||
|
||||
// --- Schema Middleware ---
|
||||
public class SchemaRegistry
|
||||
{
|
||||
private Dictionary<string, HashSet<string>> _knownSchemas = new();
|
||||
|
||||
public void RegisterSchema(string namespaceKey, List<string> newColumns)
|
||||
{
|
||||
if (!_knownSchemas.ContainsKey(namespaceKey))
|
||||
{
|
||||
_knownSchemas[namespaceKey] = new HashSet<string>();
|
||||
foreach (var col in newColumns) _knownSchemas[namespaceKey].Add(col);
|
||||
}
|
||||
else
|
||||
{
|
||||
var existing = _knownSchemas[namespaceKey];
|
||||
foreach (var col in newColumns) if (!existing.Contains(col)) existing.Add(col);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user