%global _empty_manifest_terminate_build 0 Name: python-simple-ddl-parser Version: 0.30.0 Release: 1 Summary: Simple DDL Parser to parse SQL & dialects like HQL, TSQL (MSSQL), Oracle, AWS Redshift, Snowflake, MySQL, PostgreSQL, etc ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc.; sequences, alters, custom types & other entities from ddl. License: MIT URL: https://github.com/xnuinside/simple-ddl-parser Source0: https://mirrors.nju.edu.cn/pypi/web/packages/db/40/f44a29045353d5fa20a22687d8fd9a2783cb2ce6b2e7f543e2ca1d1706c6/simple-ddl-parser-0.30.0.tar.gz BuildArch: noarch Requires: python3-ply %description Build with ply (lex & yacc in python). A lot of samples in 'tests/. Is it Stable? ^^^^^^^^^^^^^ Yes, library already has about 7000+ downloads per day - https://pypistats.org/packages/simple-ddl-parser.. As maintainer, I guarantee that any backward incompatible changes will not be done in patch or minor version. But! Pay attention that sometimes output in keywords can be changed in minor version because of fixing wrong behaviour in past. For example, previously 'auto_increment' was a part of column type, but later it became a separate column property. So, please read for minor versions changedlog. However, in process of adding support for new statements & features I see that output can be structured more optimal way and I hope to release version ``1.0.*`` with more struct output result. But, it will not be soon, first of all, I want to add support for so much statements as I can. So I don't think make sense to expect version 1.0.* before, for example, version ``0.26.0`` :) How does it work? ^^^^^^^^^^^^^^^^^ Parser supports: * SQL * HQL (Hive) * MSSQL dialec * Oracle dialect * MySQL dialect * PostgreSQL dialect * BigQuery * Redshift * Snowflake * SparkSQL * IBM DB2 dialect You can check dialects sections after ``Supported Statements`` section to get more information that statements from dialects already supported by parser. If you need to add more statements or new dialects - feel free to open the issue. Feel free to open Issue with DDL sample ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pay attentions that I'm adding functional tests for all supported statement, so if you see that your statement is failed and you didn't see it in the test 99,9% that I did n't have sample with such SQL statement - so feel free to open the issue and I will add support for it. **If you need some statement, that not supported by parser yet**\ : please provide DDL example & information about that is it SQL dialect or DB. Types that are used in your DB does not matter, so parser must also work successfuly to any DDL for SQL DB. Parser is NOT case sensitive, it did not expect that all queries will be in upper case or lower case. So you can write statements like this: Alter Table Persons ADD CONSTRAINT CHK_PersonAge CHECK (Age>=18 AND City='Sandnes'); It will be parsed as is without errors. If you have samples that cause an error - please open the issue (but don't forget to add ddl example), I will be glad to fix it. A lot of statements and output result you can find in tests on the github - https://github.com/xnuinside/simple-ddl-parser/tree/main/tests . How to install ^^^^^^^^^^^^^^ pip install simple-ddl-parser %package -n python3-simple-ddl-parser Summary: Simple DDL Parser to parse SQL & dialects like HQL, TSQL (MSSQL), Oracle, AWS Redshift, Snowflake, MySQL, PostgreSQL, etc ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc.; sequences, alters, custom types & other entities from ddl. Provides: python-simple-ddl-parser BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-simple-ddl-parser Build with ply (lex & yacc in python). A lot of samples in 'tests/. Is it Stable? ^^^^^^^^^^^^^ Yes, library already has about 7000+ downloads per day - https://pypistats.org/packages/simple-ddl-parser.. As maintainer, I guarantee that any backward incompatible changes will not be done in patch or minor version. But! Pay attention that sometimes output in keywords can be changed in minor version because of fixing wrong behaviour in past. For example, previously 'auto_increment' was a part of column type, but later it became a separate column property. So, please read for minor versions changedlog. However, in process of adding support for new statements & features I see that output can be structured more optimal way and I hope to release version ``1.0.*`` with more struct output result. But, it will not be soon, first of all, I want to add support for so much statements as I can. So I don't think make sense to expect version 1.0.* before, for example, version ``0.26.0`` :) How does it work? ^^^^^^^^^^^^^^^^^ Parser supports: * SQL * HQL (Hive) * MSSQL dialec * Oracle dialect * MySQL dialect * PostgreSQL dialect * BigQuery * Redshift * Snowflake * SparkSQL * IBM DB2 dialect You can check dialects sections after ``Supported Statements`` section to get more information that statements from dialects already supported by parser. If you need to add more statements or new dialects - feel free to open the issue. Feel free to open Issue with DDL sample ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pay attentions that I'm adding functional tests for all supported statement, so if you see that your statement is failed and you didn't see it in the test 99,9% that I did n't have sample with such SQL statement - so feel free to open the issue and I will add support for it. **If you need some statement, that not supported by parser yet**\ : please provide DDL example & information about that is it SQL dialect or DB. Types that are used in your DB does not matter, so parser must also work successfuly to any DDL for SQL DB. Parser is NOT case sensitive, it did not expect that all queries will be in upper case or lower case. So you can write statements like this: Alter Table Persons ADD CONSTRAINT CHK_PersonAge CHECK (Age>=18 AND City='Sandnes'); It will be parsed as is without errors. If you have samples that cause an error - please open the issue (but don't forget to add ddl example), I will be glad to fix it. A lot of statements and output result you can find in tests on the github - https://github.com/xnuinside/simple-ddl-parser/tree/main/tests . How to install ^^^^^^^^^^^^^^ pip install simple-ddl-parser %package help Summary: Development documents and examples for simple-ddl-parser Provides: python3-simple-ddl-parser-doc %description help Build with ply (lex & yacc in python). A lot of samples in 'tests/. Is it Stable? ^^^^^^^^^^^^^ Yes, library already has about 7000+ downloads per day - https://pypistats.org/packages/simple-ddl-parser.. As maintainer, I guarantee that any backward incompatible changes will not be done in patch or minor version. But! Pay attention that sometimes output in keywords can be changed in minor version because of fixing wrong behaviour in past. For example, previously 'auto_increment' was a part of column type, but later it became a separate column property. So, please read for minor versions changedlog. However, in process of adding support for new statements & features I see that output can be structured more optimal way and I hope to release version ``1.0.*`` with more struct output result. But, it will not be soon, first of all, I want to add support for so much statements as I can. So I don't think make sense to expect version 1.0.* before, for example, version ``0.26.0`` :) How does it work? ^^^^^^^^^^^^^^^^^ Parser supports: * SQL * HQL (Hive) * MSSQL dialec * Oracle dialect * MySQL dialect * PostgreSQL dialect * BigQuery * Redshift * Snowflake * SparkSQL * IBM DB2 dialect You can check dialects sections after ``Supported Statements`` section to get more information that statements from dialects already supported by parser. If you need to add more statements or new dialects - feel free to open the issue. Feel free to open Issue with DDL sample ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Pay attentions that I'm adding functional tests for all supported statement, so if you see that your statement is failed and you didn't see it in the test 99,9% that I did n't have sample with such SQL statement - so feel free to open the issue and I will add support for it. **If you need some statement, that not supported by parser yet**\ : please provide DDL example & information about that is it SQL dialect or DB. Types that are used in your DB does not matter, so parser must also work successfuly to any DDL for SQL DB. Parser is NOT case sensitive, it did not expect that all queries will be in upper case or lower case. So you can write statements like this: Alter Table Persons ADD CONSTRAINT CHK_PersonAge CHECK (Age>=18 AND City='Sandnes'); It will be parsed as is without errors. If you have samples that cause an error - please open the issue (but don't forget to add ddl example), I will be glad to fix it. A lot of statements and output result you can find in tests on the github - https://github.com/xnuinside/simple-ddl-parser/tree/main/tests . How to install ^^^^^^^^^^^^^^ pip install simple-ddl-parser %prep %autosetup -n simple-ddl-parser-0.30.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-simple-ddl-parser -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 21 2023 Python_Bot - 0.30.0-1 - Package Spec generated