This commit is contained in:
@@ -463,23 +463,23 @@ namespace AyaNova.Util
|
||||
List<string> ret = new List<string>();
|
||||
using (var conn = new Npgsql.NpgsqlConnection(_dbConnectionString))
|
||||
{
|
||||
conn.Open();
|
||||
await conn.OpenAsync();
|
||||
|
||||
using (var command = conn.CreateCommand())
|
||||
{
|
||||
command.CommandText = "SELECT table_name FROM information_schema.tables WHERE table_schema='public' AND table_type='BASE TABLE';";
|
||||
using (var result = command.ExecuteReader())
|
||||
using (var result = await command.ExecuteReaderAsync())
|
||||
{
|
||||
if (result.HasRows)
|
||||
{
|
||||
while (result.Read())
|
||||
while (await result.ReadAsync())
|
||||
{
|
||||
ret.Add(result.GetString(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
conn.Close();
|
||||
await conn.CloseAsync();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user