sqlscope 1.0.0__tar.gz → 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {sqlscope-1.0.0 → sqlscope-1.0.1}/.gitignore +0 -5
  2. {sqlscope-1.0.0 → sqlscope-1.0.1}/LICENSE +1 -1
  3. {sqlscope-1.0.0 → sqlscope-1.0.1}/PKG-INFO +1 -1
  4. {sqlscope-1.0.0 → sqlscope-1.0.1}/pyproject.toml +1 -1
  5. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/builder/sql.py +5 -5
  6. {sqlscope-1.0.0 → sqlscope-1.0.1}/.readthedocs.yaml +0 -0
  7. {sqlscope-1.0.0 → sqlscope-1.0.1}/Makefile +0 -0
  8. {sqlscope-1.0.0 → sqlscope-1.0.1}/README.md +0 -0
  9. {sqlscope-1.0.0 → sqlscope-1.0.1}/datasets/catalogs/constraints.json +0 -0
  10. {sqlscope-1.0.0 → sqlscope-1.0.1}/datasets/catalogs/miedema.json +0 -0
  11. {sqlscope-1.0.0 → sqlscope-1.0.1}/datasets/sql/constraints.sql +0 -0
  12. {sqlscope-1.0.0 → sqlscope-1.0.1}/datasets/sql/miedema.sql +0 -0
  13. {sqlscope-1.0.0 → sqlscope-1.0.1}/docs/Makefile +0 -0
  14. {sqlscope-1.0.0 → sqlscope-1.0.1}/docs/conf.py +0 -0
  15. {sqlscope-1.0.0 → sqlscope-1.0.1}/docs/index.rst +0 -0
  16. {sqlscope-1.0.0 → sqlscope-1.0.1}/docs/make.bat +0 -0
  17. {sqlscope-1.0.0 → sqlscope-1.0.1}/docs/requirements.txt +0 -0
  18. {sqlscope-1.0.0 → sqlscope-1.0.1}/requirements.txt +0 -0
  19. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/__init__.py +0 -0
  20. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/__init__.py +0 -0
  21. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/builder/__init__.py +0 -0
  22. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/builder/postgres.py +0 -0
  23. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/catalog.py +0 -0
  24. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/column.py +0 -0
  25. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/constraint.py +0 -0
  26. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/schema.py +0 -0
  27. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/catalog/table.py +0 -0
  28. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/__init__.py +0 -0
  29. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/extractors.py +0 -0
  30. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/query.py +0 -0
  31. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/set_operations/__init__.py +0 -0
  32. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/set_operations/binary_set_operation.py +0 -0
  33. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/set_operations/select.py +0 -0
  34. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/set_operations/set_operation.py +0 -0
  35. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/smt.py +0 -0
  36. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/tokenized_sql.py +0 -0
  37. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/__init__.py +0 -0
  38. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/base.py +0 -0
  39. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/binary_ops.py +0 -0
  40. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/functions.py +0 -0
  41. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/predicates.py +0 -0
  42. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/primitives.py +0 -0
  43. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/queries.py +0 -0
  44. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/types.py +0 -0
  45. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/unary_ops.py +0 -0
  46. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/query/typechecking/util.py +0 -0
  47. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/__init__.py +0 -0
  48. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/ast/__init__.py +0 -0
  49. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/ast/column.py +0 -0
  50. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/ast/function.py +0 -0
  51. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/ast/subquery.py +0 -0
  52. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/ast/table.py +0 -0
  53. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/sql.py +0 -0
  54. {sqlscope-1.0.0 → sqlscope-1.0.1}/src/sqlscope/util/tokens.py +0 -0
  55. {sqlscope-1.0.0 → sqlscope-1.0.1}/tests/test_extractors.py +0 -0
  56. {sqlscope-1.0.0 → sqlscope-1.0.1}/tests/test_query.py +0 -0
  57. {sqlscope-1.0.0 → sqlscope-1.0.1}/tests/test_typechecking.py +0 -0
@@ -178,9 +178,4 @@ cython_debug/
178
178
  # PyPI configuration file
179
179
  .pypirc
180
180
 
181
- <<<<<<< Updated upstream
182
- # VS Code
183
- .vscode/
184
- =======
185
181
  .vscode
186
- >>>>>>> Stashed changes
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) [2025] [Davide Ponzini, Davide Miggiano]
3
+ Copyright (c) [2026] [Davide Ponzini]
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlscope
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: This project extracts catalog and query metadata from a SQL query.
5
5
  Project-URL: Repository, https://github.com/DavidePonzini/sqlscope
6
6
  Project-URL: Documentation, https://sqlscope.readthedocs.io/en/latest/index.html
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "sqlscope"
7
- version = "1.0.0"
7
+ version = "1.0.1"
8
8
  authors = [
9
9
  { name="Davide Ponzini", email="davide.ponzini95@gmail.com" },
10
10
  ]
@@ -202,11 +202,11 @@ def build_catalog_from_sql(sql_string: str, search_path: str = 'public') -> Cata
202
202
 
203
203
  # Add Primary Key constraint to catalog
204
204
  # NOTE: needs to be perfomed after all columns have been added, since PKs can be defined at both column and table level
205
- assert len(pk_col_names) > 0, 'Primary Key columns should have been identified'
206
- catalog[schema_name][table_name].add_unique_constraint(
207
- columns=pk_col_names,
208
- constraint_type=ConstraintType.PRIMARY_KEY
209
- )
205
+ if len(pk_col_names) > 0:
206
+ catalog[schema_name][table_name].add_unique_constraint(
207
+ columns=pk_col_names,
208
+ constraint_type=ConstraintType.PRIMARY_KEY
209
+ )
210
210
 
211
211
  # Add Unique constraints to catalog
212
212
  # NOTE: needs to be perfomed after all columns have been added, since Unique constraints can be defined at both column and table level
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes