Skip to main content

Add your description here

Project description

SQL Complexity Estimator

This package provides a simple algorithm to calculate complexity of SQL expressions.

It's based on SQLGlot abstract syntax tree, so the provided SQL must be compatible with SQLGlot engines.

The rules are the following:

  • +1 per join expression
  • +1 per predicate after WHERE or HAVING
  • +1 per CTE
  • +1 per GROUP BY expression
  • +1 per UNION or INTERSECT
  • +1 per function call
  • +1 per CASE expression

This package is inspired on the comments of this stack overflow thread.

Install

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

sql_complexity-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sql_complexity-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file sql_complexity-0.1.0.tar.gz.

File metadata

  • Download URL: sql_complexity-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for sql_complexity-0.1.0.tar.gz
Algorithm Hash digest
SHA256 826f6d722dd168823b6c6fb02a959e36651c455d1aacc7ee8cd915472ad8eb26
MD5 1a75422ede395b7df55fb5d97f16dea5
BLAKE2b-256 847ffda8822c5e4a82e89877eb60d2cde1c3231f400fda7d84f7093ad5987402

See more details on using hashes here.

File details

Details for the file sql_complexity-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sql_complexity-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cdee28008f7cee3df77e2eb8a089758bc0d2896982712267f896735724a512b
MD5 9ff6ff4fc7677e8cf55f06f217b7f5f3
BLAKE2b-256 1badbad5b133ed8f57495b73cf4868119c60fcb366355b4b7aa9a57d88720adc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page