catalogColumns method

Future<Result<QueryResult>> catalogColumns(
  1. String connectionId,
  2. String table
)

Queries the database catalog for column information.

Returns metadata about columns in the specified table. The connectionId must be a valid active connection. The table must be a non-empty table name.

Returns a ValidationError if table name is empty.

Implementation

Future<Result<QueryResult>> catalogColumns(
  String connectionId,
  String table,
) async {
  if (table.trim().isEmpty) {
    return const Failure<QueryResult, OdbcError>(
      ValidationError(message: 'Table name cannot be empty'),
    );
  }
  return _repository.catalogColumns(connectionId, table);
}