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_soql_parser import parse
parse_result = parse("SELECT Id FROM Account")
where parse_result is a ParseResults object from pyparsing.
Notable caveats
Unsupported features
- Subqueries (e.g.,
SELECT Name, (SELECT LastName FROM Contacts) FROM Account) - Aggregate queries
- SOQL specific WHERE-clause tokens (e.g.,
LAST_N_DAYS:<integer>)
Partially supported
These are either partially supported or weakly supported
- Related attributes (e.g.,
SELECT Id, Account.Name FROM Contact). The object name is not yet parsed out on its own. This will simply parse out"Account.Name"
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python-soql-parser-0.2.0.tar.gz.
File metadata
- Download URL: python-soql-parser-0.2.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.8.16 Linux/5.4.0-1103-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3df8612afe4a9bbe45017eb857738fb81f9715da32bacb12fc99c4706f80c7e
|
|
| MD5 |
2eb48c2230feba0e9fdad5bf8a49140d
|
|
| BLAKE2b-256 |
98b9aa24cd82ed8470a52ea23cfbfb887634b931b7d7ed669702698b1fdfc9de
|
File details
Details for the file python_soql_parser-0.2.0-py3-none-any.whl.
File metadata
- Download URL: python_soql_parser-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.8.16 Linux/5.4.0-1103-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51b37064c2b7e098e9020837707aa30accfff918303fc92fb63fefb3e21804d3
|
|
| MD5 |
e1633b85947350937c72a5206e56586e
|
|
| BLAKE2b-256 |
e1e34cd320e3a36a3eeb8ff3ba6abdb2fc087d151b8204cd581b1a6ce951d5ac
|