Skip to main content

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:)

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 instally (poetry)[https://python-poetry.org/]. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-soql-parser-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

python_soql_parser-0.1.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page