-
Notifications
You must be signed in to change notification settings - Fork 0
Add PartitionFunctionCall and double-colon expression support #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix the $type in ast.json to use consistent casing (AlterFullTextIndexStatement) matching MS ScriptDom naming convention.
Fix NullLiteral value in ast.json to use uppercase "NULL" for consistency with existing tests.
- Add AST types for FullTextTableReference (CONTAINSTABLE, FREETEXTTABLE) - Add AST type for SemanticTableReference (SEMANTICKEYPHRASETABLE, etc.) - Add LiteralTableHint AST type for hints like SPATIAL_WINDOW_MAX_CELLS - Add parser for full-text and semantic table functions - Add SPATIAL_WINDOW_MAX_CELLS table hint parsing - Allow TYPE and LANGUAGE tokens to be used as identifiers in column refs - Enable FromClauseTests110 and Baselines110_FromClauseTests110 tests
- Add AST types for CreateResourcePoolStatement and AlterResourcePoolStatement - Add ResourcePoolParameter, ResourcePoolAffinitySpecification, LiteralRange types - Parse various resource pool parameters (CPU, memory, IO percent) - Parse AFFINITY SCHEDULER/NUMANODE specifications with ranges - Enable 4 resource pool related tests
- Always output AttachMode field in CreateDatabaseStatement - Add TokenScoped to isKeywordAsIdentifier() to allow SCOPED as database name - Fix SCOPED keyword handling with lookahead to avoid consuming it when not followed by CREDENTIAL - Enable BaselinesCommon_CreateDatabaseStatementTests and CreateDatabaseStatementTests - Update PhaseOne_CreateDatabase ast.json to include AttachMode
In T-SQL, at the start of a batch, you can call a stored procedure without the EXEC keyword (e.g., "sp_grantdbaccess 'user'"). This change modifies parseLabelOrError to detect such cases and create an ExecuteStatement. - Add isImplicitExecuteParameter() to detect valid parameter tokens - Add parseImplicitExecuteStatement() to construct the ExecuteStatement AST - Enable ExecuteStatementTests
- Add XmlNamespaces parsing to parseWithStatement - Add XmlNamespacesDefaultElement AST type for DEFAULT namespace elements - Update WithCtesAndXmlNamespaces to include XmlNamespaces field - Add WithCtesAndXmlNamespaces field to SelectStatement - Fix parseStringLiteral to handle national strings (N'...') - Update cursor parsing to handle WITH clause in SELECT - Update JSON marshaling for new types Enables Baselines90_CTEStatementTests and CTEStatementTests
- Add Source field to CreateLoginStatement AST - Add CreateLoginSource interface and ExternalCreateLoginSource type - Add PrincipalOption interface for login options - Update LiteralPrincipalOption and IdentifierPrincipalOption to implement PrincipalOption - Parse SID, TYPE, DEFAULT_DATABASE, DEFAULT_LANGUAGE options - Add JSON marshaling for new types Enables LoginStatementTests150 and Baselines150_LoginStatementTests150
- Add AST types for CREATE/ALTER/DROP FULLTEXT STOPLIST statements - Add DROP FULLTEXT CATALOG and DROP FULLTEXT INDEX AST types - Add parsing for all FULLTEXT STOPLIST variations including: - CREATE FULLTEXT STOPLIST with SYSTEM STOPLIST, source, and AUTHORIZATION - ALTER FULLTEXT STOPLIST ADD/DROP with LANGUAGE support - DROP FULLTEXT STOPLIST - Add JSON marshaling for all new statement types - Update parseIdentifierOrValueExpression to handle TokenBinary/TokenNationalString
- Add REFERENCES as standalone constraint (inline foreign key without FOREIGN KEY prefix) - Add NATIONAL prefix support for data types (NATIONAL TEXT -> NText, etc.) - Add schema-qualified data type handling (sys.int, sys.text, etc.) - Add multi-word type handling with schema prefix (sys.Char varying -> NVarChar) - Add XML data type with schema collection for schema-qualified paths - Add BINARY VARYING -> VarBinary conversion
- Add isInsertFunctionParams() to distinguish between: - dbo.f1() - table-valued function call (empty or non-identifier params) - table (c1, c2) - table with column list (identifier-only params) - Update parseInsertTarget() to use SchemaObjectFunctionTableReference for function calls
- Add GroupingSetsGroupingSpecification AST type - Add parseGroupingSetsGroupingSpecification() with support for nested CUBE/ROLLUP - Add parseGroupingSetsArgument() and parseGroupingSetsCompositeArgument() helpers - Marshal GROUPING SETS with "Sets" field name (matching expected schema) - Always output UniqueRowFilter as "NotSpecified" when not set - Enables Baselines100_GroupByClauseTests100 and GroupByClauseTests100
- Output JoinHint as "None" when not explicitly set - Enables BaselinesCommon_QueryExpressionTests and QueryExpressionTests
- Add BrokerPriorityParameter, CreateBrokerPriorityStatement, AlterBrokerPriorityStatement, DropBrokerPriorityStatement AST types - Add parsing for CREATE/ALTER/DROP BROKER PRIORITY statements - Add JSON marshaling for broker priority statements - Support PRIORITY_LEVEL, CONTRACT_NAME, REMOTE_SERVICE_NAME, LOCAL_SERVICE_NAME parameters with DEFAULT/ANY/value options - Enables CreateAlterDropBrokerPriorityStatementTests and Baselines100_CreateAlterDropBrokerPriorityStatementTests
- Fix parseColumnReferenceWithLeadingDots to detect function calls - Handle .f2() style function calls with empty identifier prefix
- Add PartitionFunctionCall AST type for $PARTITION syntax - Add parsing for [db.]$PARTITION.func(args) expressions - Add JSON marshaling for PartitionFunctionCall - Fix bracket-quoted identifier parsing in double-colon expressions - Add double-colon (::) handling for expressions starting with leading dots - Filter empty identifiers from leading dots when building SchemaObjectName - Enable Baselines90_ExpressionTests90 and ExpressionTests90
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.