Metadata-Version: 2.1
Name: sql-dependency-resolver
Version: 1.1.0
Summary: A dependency resolution library that performs conflict resolution to create a topological ordering for creating and destroying SQL objects such as views, functions and indexes.
Author-email: Mustafa Mustafa <mustafaymustafa@icloud.com>
License: MIT License        
        Copyright (c) 2022 Mustafa Mustafa        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.        
Project-URL: Homepage, https://github.com/MustafayMustafa/sql-dependency-resolution
Keywords: sql,views,topological sort
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'

# sql-dependency-resolution
A dependency resolution library that performs conflict resolution to create a topological ordering for creating and destroying SQL objects such as views, functions and indexes.

## Installation
Install using `pip install sql-dependency-resolver`

## Usage
* import using `from resolver import ViewDependencyResolver`
* use `create_order` and `drop_order` to retrieve dependency ordering.(currently only views are supported).

## Caveats
* assumes name of file is the name of view.
* views must be pre-fixed with `vw_` or `mvw_`.
* dependecies are collected from join conditions.

## Tests
Run tests with `pytest`
## TODO
* implement functions, procedures and indexes.
* auto detect name from header using regex.
