Made SqlBuilder methods async

This commit is contained in:
2025-09-05 20:22:19 -05:00
parent 9146e698c9
commit 645d41bdb3
2 changed files with 69 additions and 61 deletions

View File

@@ -55,7 +55,7 @@ namespace DbToolsTester.Forms {
return null;
}
private void ToolbarItemClicked(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
private async void ToolbarItemClicked(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
if (e.Item.Equals(bbiDelta)) {
SQLiteConnection db1 = new SQLiteConnection("Data Source=" + Database1File + ";Version=3;");
SQLiteConnection db2 = new SQLiteConnection("Data Source=" + Database2File + ";Version=3;");
@@ -85,7 +85,7 @@ namespace DbToolsTester.Forms {
if (frm.ShowDialog(this) == DialogResult.OK) {
using (var cn = new SQLiteConnection("Data Source=" + (frm.SelectedDatabase == Path.GetFileName(Database1File) ? Database1File : Database2File) + ";Version=3;")) {
SqlBuilder builder = new SqlBuilder();
string sql = builder.GetTableCreateSql(cn, frm.SelectedTable);
string sql = await builder.GetTableCreateSqlAsync(cn, frm.SelectedTable);
if (!string.IsNullOrEmpty(sql)) {
deltaSql.Text = sql;
} else {