A pyparsing-based library for parsing SOQL statements
Project description
CONTRIBUTORS WANTED!!
Installation
pip install python-soql-parser
or, with poetry
poetry add python-soql-parser
Usage
from python_sql_parser import parse
parse_result = parse("SELECT Id FROM Account")
where parse_result
is a ParseResults object from pyparsing.
Notable unsupported features
- Related attributes (e.g.,
SELECT Id, Account.Name FROM Contact
) - Subqueries (e.g.,
SELECT Name, (SELECT LastName FROM Contacts) FROM Account
) - Aggregate queries
- SOQL specific WHERE-clause tokens (e.g.,
LAST_N_DAYS:<integer>
) - ORDER BY
Contributing
A lot of work remains to be done. Practically no SOQL-specific features are supported as of yet. If you want to contribute, just open a PR! (and add a test for your new feature)
Setting up locally
First install poetry. Afterwards, to install the dependencies, run
poetry install
Running the tests
Simply execute
pytest
House cleaning
Please sort imports with isort
and format the code with black
(in that order).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-soql-parser-0.1.5.tar.gz
.
File metadata
- Download URL: python-soql-parser-0.1.5.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5669284b3466b6c3bb3fc5bbcc676acffb96dd8bb475f19efc2f8d71a74e4dbf |
|
MD5 | 48ea740232a74e344baf15ff9c6cef6c |
|
BLAKE2b-256 | b7198ce5a802215168b6c4e3efe464975b90cb3af8f0e3445705f3a00a5ccba5 |
File details
Details for the file python_soql_parser-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: python_soql_parser-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.7 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d4c1ed2aba4c3c08f78f2e5bfd0f28b1a1242c45b542784e0fc476625fb5ea8 |
|
MD5 | 98e06670b7d2e1ec09b90fa402a66faf |
|
BLAKE2b-256 | 5e74533244489e678bf08f5cc3c16cf291e984636901f1cd4b3ce5a08e8507bd |