You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+89-2Lines changed: 89 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,15 @@ An experimental DuckDB extension that exposes functionality from DuckDB's native
4
4
5
5
## Overview
6
6
7
-
`parser_tools` is a DuckDB extension designed to provide SQL parsing capabilities within the database. It allows you to analyze SQL queries and extract structural information directly in SQL. This extension provides parsing functions for tables, WHERE clauses, and function calls (see [Functions](#functions) below).
7
+
`parser_tools` is a DuckDB extension designed to provide SQL parsing capabilities within the database. It allows you to analyze SQL queries and extract structural information directly in SQL. This extension provides parsing functions for tables, WHERE clauses, function calls, and statements.
8
8
9
9
## Features
10
10
11
11
-**Extract table references** from a SQL query with context information (e.g. `FROM`, `JOIN`, etc.)
12
12
-**Extract function calls** from a SQL query with context information (e.g. `SELECT`, `WHERE`, `HAVING`, etc.)
13
13
-**Extract column references** from a SQL query with comprehensive dependency tracking
14
14
-**Parse WHERE clauses** to extract conditions and operators
15
+
-**Parse multi-statement SQL** to extract individual statements or count the number of statements
15
16
- Support for **window functions**, **nested functions**, and **CTEs**
16
17
-**Alias chain tracking** for complex column dependencies
17
18
-**Nested struct field access** parsing (e.g., `table.column.field.subfield`)
@@ -106,7 +107,7 @@ Context helps identify where elements are used in the query.
106
107
107
108
## Functions
108
109
109
-
This extension provides parsing functions for tables, functions, columns, and WHERE clauses. Each category includes both table functions (for detailed results) and scalar functions (for programmatic use).
110
+
This extension provides parsing functions for tables, functions, columns, statements, and WHERE clauses. Each category includes both table functions (for detailed results) and scalar functions (for programmatic use).
110
111
111
112
In general, errors (e.g. Parse Exception) will not be exposed to the user, but instead will result in an empty result. This simplifies batch processing. When validity is needed, [is_parsable](#is_parsablesql_query--scalar-function) can be used.
0 commit comments