Add project files.

This commit is contained in:
2025-08-31 10:31:37 -05:00
parent 22897c0b91
commit 67e2959f3c
12 changed files with 906 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using DbTools.Model;
using System.Collections.Generic;
using System.Text;
namespace DbTools {
internal static class DatabaseExtensions {
public static string ExportSql(this Database db) {
StringBuilder sb = new StringBuilder();
foreach (var table in db.Tables.GetTables()) {
sb.AppendLine(table.FullSql());
}
return sb.ToString();
}
public static void ImportFromSqlite(this Database db) {
}
public static string[] GetAllIndexes(this Database db) {
List<string> indexes = new List<string>();
foreach (var table in db.Tables.GetTables()) {
indexes.AddRange(table.Indexes.Keys);
}
return indexes.ToArray();
}
}
}