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.2.tar.gz (3.8 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.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sql_complexity-0.1.2.tar.gz
Algorithm Hash digest
SHA256 765d35b0dc575bcf60f59faf728dd3fc16077e345e2c022b8189d32721fde6e0
MD5 09d4f1b6372e0fddcbd0f62244561a1b
BLAKE2b-256 420ba3fac70e5a82ce0442307bb237183616ec9b3fd39af5d6481869b0a6bb6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sql_complexity-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa52d4367d6860521f81102a18cafc2c5155a4720d78366919170076aab9a578
MD5 33cc54af2a779877424bff9368fa937d
BLAKE2b-256 b34a906b37446003a2ab1cf1ef96adfb88b95d9574bb4f098c2eae3a22fb8570

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