v1a0 / sqllex

The most pythonic ORM (for SQLite and PostgreSQL). Seriously, try it out!
https://v1a0.github.io/sqllex
GNU General Public License v3.0
92 stars 8 forks source link

incomprehensible behavior #17

Closed Phizilion closed 3 years ago

Phizilion commented 3 years ago

if there is one row in the table, and I want to display all the rows, I do not get a list of all rows, but when there are 2 or more rows in the table, then I get a list of these rows

v1a0 commented 3 years ago

Hey @Phizilion, thanks for opened this issue.

Yeah, I'm absolutely agree with you, there have to be standard output with expected data type.

Converting [['some_val', ], ] to ['some_val', ] for select-like methods were experimental feature. I'm planning to remove it with the next update (v0.1.9+) today.

I'll notify you when release this update.

P.S. As temporary "one hour" solution, I suggest you make instance checking: if isinstance(data[0], list):, where data is your is selected list or list[list] value.

Or just give me a few hours. and I'll fix it

Phizilion commented 3 years ago

Or just give me a few hours. and I'll fix it

Well I'll wait.

v1a0 commented 3 years ago

Fixed since Sqllex version 0.1.9.0

pip install sqllex -U