Class BatchMetadataCollector
Object
gudusoft.gsqlparser.resolver2.metadata.BatchMetadataCollector
Delta 1: Batch-local DDL metadata collector.
Collects table and column metadata from DDL statements (CREATE TABLE, CREATE VIEW)
within the same SQL batch and creates a TSQLEnv for use by TSQLResolver2.
This enables standalone resolution of SQL batches that contain both DDL and DML,
without requiring external metadata from TSQLEnv.
Example:
CREATE TABLE t(id int, name varchar(10)); SELECT t.id, t.name FROM t;The collector will extract table "t" with columns "id" and "name" from the CREATE TABLE statement, making them available for resolution in the SELECT.
-
Constructor Summary
ConstructorsConstructorDescriptionBatchMetadataCollector(TStatementList statements, EDbVendor vendor) Create a batch metadata collector. -
Method Summary
-
Constructor Details
-
BatchMetadataCollector
Create a batch metadata collector.- Parameters:
statements- The list of SQL statements to processvendor- The database vendor
-
-
Method Details
-
collect
Collect metadata from DDL statements and create a TSQLEnv.- Returns:
- A TSQLEnv containing table/column metadata from DDL statements, or null if no DDL statements were found
-