kragniz / kragniz/prettytable

Field names must (not) be unique!

Open
#39 2 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
Python
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
By design, PrettyTables forbids duplicate field names. But this very case
naturally occurs in any table returned by an unfiltered cross product SQL
request, e.g.:

cursor = c.execute("SELECT * FROM foobar A, foobar B")
t = prettytable.from_db_cursor(cursor)

Can you add an option to override the check for uniqueness?

Thanks!
```

Original issue reported on code.google.com by `aristide.grange` on 8 Oct 2013 at 7:57

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the prettytable.from_db_cursor entry point and trace where field-name uniqueness is checked for cursor results. Define how an option should override that check while preserving the current default behavior; done means duplicate names from an unfiltered cross-product query can be represented when requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.