Metadata-Version: 2.4
Name: lark_sqlpp
Version: 0.1
Summary: A package containing lark grammar and parser method for sqlpp
Project-URL: Homepage, https://github.com/couchbaselabs/sqlpp-lark
Project-URL: Issues, https://github.com/couchbaselabs/sqlpp-lark/issues
Author-email: Dmitrii Chechetkin <dmitrii.chechetkin@couchbase.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: lark>=1.3.1
Description-Content-Type: text/markdown

# Lark SQL++ grammar

Sql++ lark grammar implementation for python and (potentially) javascript.

## Usage in python

### Installing the package with pip:
```shell
pip install git+ssh://git@github.com/couchbaselabs/lark_sqlpp#egg=lark_sqlpp
```

### Example usage
```python
from lark_sqlpp import *

def main():
    # validate a query
    parse_sqlpp("SELECT 1")

    # extract collection paths
    collection_paths = extract_collections(parse_sqlpp("SELECT * FROM test"))

    # check if sqlpp script modifies data
    modifies_data(parse_sqlpp("UPDATE test SET x = y"))

    # check if sqlpp script modifies structure
    modifies_structure(parse_sqlpp("CREATE SCOPE test.scope"))
```
