feat(porttracker): add DB access layer and init command

Add Database.cs with SQLite connection management and helper methods
(Execute, ExecuteScalar, Query), Schema.cs for schema initialization,
and replace default Program.cs with System.CommandLine v3 CLI featuring
global --db/--schema options and an init command.
This commit is contained in:
Joseph Doherty
2026-02-26 06:08:27 -05:00
parent 3b43922f5c
commit 9fe6a8ee36
3 changed files with 123 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
namespace NatsNet.PortTracker.Data;
public static class Schema
{
public static void Initialize(Database db, string schemaPath)
{
var sql = File.ReadAllText(schemaPath);
db.Execute(sql);
}
}