hasColumns method
Determines if the given table has all of the specified columns.
Implementation
@override
Future<bool> hasColumns(
String table,
List<String> columns, {
String? schema,
}) async {
final tableColumns = snapshot.columns
.where(
(c) => _equalsOwner(c.schema, schema) && _equals(c.tableName, table),
)
.toList();
for (final column in columns) {
if (!tableColumns.any((c) => _equals(c.name, column))) {
return false;
}
}
return true;
}