You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

sql-metadata

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-metadata - pypi Package Compare versions

Comparing version
2.12.0
to
2.13.0
+1
-1
PKG-INFO
Metadata-Version: 2.1
Name: sql_metadata
Version: 2.12.0
Version: 2.13.0
Summary: Uses tokenized query returned by python-sqlparse and generates query metadata

@@ -5,0 +5,0 @@ Home-page: https://github.com/macbre/sql-metadata

[tool.poetry]
name = "sql_metadata"
version = "2.12.0"
version = "2.13.0"
license="MIT"

@@ -20,6 +20,6 @@ description = "Uses tokenized query returned by python-sqlparse and generates query metadata"

[tool.poetry.dev-dependencies]
black = "^24.4"
black = "^24.8"
coverage = {extras = ["toml"], version = "^6.5"}
pylint = "^3.2.3"
pytest = "^8.2.2"
pylint = "^3.2.6"
pytest = "^8.3.2"
pytest-cov = "^5.0.0"

@@ -26,0 +26,0 @@ coveralls = "^3.3.1"

@@ -84,2 +84,3 @@ """

DROP = "DROP TABLE"
TRUNCATE = "TRUNCATE TABLE"

@@ -113,2 +114,3 @@

"CREATEFUNCTION": QueryType.CREATE,
"TRUNCATETABLE": QueryType.TRUNCATE,
}

@@ -115,0 +117,0 @@

@@ -119,3 +119,3 @@ # pylint: disable=C0302

switch = self._get_switch_by_create_query(tokens, index)
elif tokens[index].normalized in ("ALTER", "DROP"):
elif tokens[index].normalized in ("ALTER", "DROP", "TRUNCATE"):
switch = tokens[index].normalized + tokens[index + 1].normalized

@@ -122,0 +122,0 @@ else:

@@ -190,3 +190,3 @@ """

self.next_token.normalized in [",", "FROM"]
and self.previous_token.normalized not in [",", ".", "(", "SELECT"]
and self.previous_token.normalized not in ["*", ",", ".", "(", "SELECT"]
and not self.previous_token.is_keyword

@@ -193,0 +193,0 @@ and (