Bug Fixes
- **cli.py**: Append limit to select only
([`66f1d57`](https://github.com/PRQL/pyprql/commit/66f1d57cdd3e69141383f712a2ae71c1eb34a2ec))
This checks the generated SQL query for SELECT before appending LIMIT. This should allow us to run
non-returning queries (like CREATE TABLE) from the SQL cli.
See 12.
- **cli.py**: Check for sqlalchemy error
([`fe2c804`](https://github.com/PRQL/pyprql/commit/fe2c804470139699a3708a286167ba1c297b0aaa))
When executing an SQL query, this checks if a ResourceClosedError is thrown. As this is indicative
of a successful query that doesnot return (ie CREATE/UPDATE/DELETE/etc.), we can catch it and
print a null line instead of throwing the error. If the error is not generated, then we have
results, so we print them to the screen.
Closes 12.
- **cli.py**: Increase default limit
([`b5e7be4`](https://github.com/PRQL/pyprql/commit/b5e7be4b574e476495367dd5af26df3633d47b38))
Increses the default LIMIT from 5 to 25.
See 12.
Build System
- Adding support for python3.7 and typing.Literal
([`143d7bc`](https://github.com/PRQL/pyprql/commit/143d7bc6d54b72d5bf458564e7a20cc4b3e110a6))
- Fixing lint for prql.py
([`23f027f`](https://github.com/PRQL/pyprql/commit/23f027fcf720be2dafe294c8d8695c2b83b847ac))
Code Style
- *****: Blacken files
([`8a4b632`](https://github.com/PRQL/pyprql/commit/8a4b6327873b29c2c8dd0ece8f469c3c3ece62f6))
- *****: Blacken files
([`2a2e247`](https://github.com/PRQL/pyprql/commit/2a2e24700fc74241362f7d92617e35d2ba0363da))
Continuous Integration
- **cicd.yaml**: Run lints
([`5101e21`](https://github.com/PRQL/pyprql/commit/5101e21f923c8a9a034ee0c5a346611b011e2978))
By error, the previous actions ran form nox session twice, instead of running lint.
- **prql.py**: Add type ignore comment
([`a51b3ed`](https://github.com/PRQL/pyprql/commit/a51b3edc31b135b2e4c18b4dadd56f2305c4a7aa))
Both clauses of the try/except block for typing literal need ignore comments to make sure they pass
on all versions.
Documentation
- *****: Add module level docstings
([`a9d30de`](https://github.com/PRQL/pyprql/commit/a9d30de78450f24953b4e27b16532a6baa5a777f))
After the refactor, add module level docstrings for new __init__'s.
- **cli.py**: Correct docstrings
([`ee2a5f2`](https://github.com/PRQL/pyprql/commit/ee2a5f2eeee8c8ce8b5e8cdc3aad8022c591527a))
A few docstrings were mangled in the the refactor. This re-formats htem to meet numpy standards.
- **prql.py**: Add annotations
([`a03b653`](https://github.com/PRQL/pyprql/commit/a03b653590a8fd4daef26f9ae26f718498ccf75a))
Completes type annotations across the codebase.
Refactoring
- Refactor the grammar to use Larks Maybe, general cleanup
([`90781e6`](https://github.com/PRQL/pyprql/commit/90781e660424c9f2497eea849eb318e77ffb61e1))
- Refactor the grammar to use Larks Maybe, general cleanup
([`4f99b2c`](https://github.com/PRQL/pyprql/commit/4f99b2cdc0979f203893fcb424096db2852d2a58))
- **prql.py**: Clean up __init__s
([`cfbdf35`](https://github.com/PRQL/pyprql/commit/cfbdf35a3af1792b4f32b851a5d680507946e6f0))
In cases where we have to define our own init methods to satisfy Lark, a data class isn't necessary.
Additionally, in cases where a data class can be used, we should prefer to use the dataclass
__post_init__ method. This commit applies this logic across the python language framework of prql.