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


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.4.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

python_soql_parser-0.1.4-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file python-soql-parser-0.1.4.tar.gz.

File metadata

  • Download URL: python-soql-parser-0.1.4.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

Hashes for python-soql-parser-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c4942b30b77084bcc2e6cf13483467d01a35290fe9360d46fd6c097baa84398f
MD5 39b1005821a167f0443e916277a207c9
BLAKE2b-256 3854816334341007f2c69cafcf9536a9bf7ff9fae314a3036a1559a9aa45d9ea

See more details on using hashes here.

File details

Details for the file python_soql_parser-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for python_soql_parser-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b0c08e0333cf2f06776111623945248eb9e16673e572d56baa29e540efc00506
MD5 01cf0bd4b60daed00036a6c8c3318006
BLAKE2b-256 d1788b7286265ea756d4b553e52c0bd9f61d5cc618e880194e56f43c14e2a213

See more details on using hashes here.

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