Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG | Different sorting order for different columns (ASC, DESC) #59

Closed
v1a0 opened this issue Feb 5, 2022 · 1 comment
Closed

BUG | Different sorting order for different columns (ASC, DESC) #59

v1a0 opened this issue Feb 5, 2022 · 1 comment
Labels
bug Something isn't working or doesn't seems to work right

Comments

@v1a0
Copy link
Owner

v1a0 commented Feb 5, 2022

Not supporting different sorting order for different columns.

Example log:

expected = self.db.execute('SELECT id, firstName FROM "employee" ORDER BY firstName ASC, surname DESC')

        self.assertEqual(
            expected,
            self.db['employee'].select(
                SELECT=['id', 'firstName'],
                ORDER_BY=['firstName', 'ASC', 'surname', 'DESC']
            )
        )

# sqlite3.OperationalError: no such column: ASC

Generated script

SELECT id, firstName FROM "employee"  ORDER BY firstName, ASC, surname, DESC
                                                        ^             ^
                                                       [!]           [!]

How script have to look like

SELECT id, firstName FROM "employee"  ORDER BY firstName ASC, surname DESC

Version:

sqllex v0.2.0.5

@v1a0 v1a0 added the bug Something isn't working or doesn't seems to work right label Feb 5, 2022
@v1a0 v1a0 added this to To do in sqllex-kanban via automation Feb 5, 2022
v1a0 added a commit that referenced this issue Feb 6, 2022
- Fixed issue #59
- Fixed issue #52
- Typing mistakes fixed
@v1a0
Copy link
Owner Author

v1a0 commented Feb 6, 2022

Fixed since v0.2.0.6

@v1a0 v1a0 closed this as completed Feb 6, 2022
sqllex-kanban automation moved this from To do to Done Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or doesn't seems to work right
Projects
Development

No branches or pull requests

1 participant