ScriptDom version: 161.8919.0
Compatibility level used for parsing: 150
Parser did not fill Clustered property and because it is a PRIMARY KEY which are CLUSTERED by default unless explicitly defined as NONCLUSTERED, I resolved this case in my code as implicitly clustered. However it is clearly explicitly NONCLUSTERED. I think Clustered property should be false in this case.
CREATE TABLE dbo.foo
(
bar VARCHAR(512) NOT NULL
, far VARCHAR(20) NULL
, CONSTRAINT PK PRIMARY KEY NONCLUSTERED HASH (bar) WITH (BUCKET_COUNT = 500000)
, INDEX IX_2 NONCLUSTERED HASH (far)
WITH (BUCKET_COUNT = 500000)
)
WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA);
GO
Here are object properties for PK node:
So to check if index is clustered with respect to property nullability one has to do something like that:
ScriptDom version: 161.8919.0 Compatibility level used for parsing: 150
Parser did not fill
Clustered
property and because it is a PRIMARY KEY which are CLUSTERED by default unless explicitly defined as NONCLUSTERED, I resolved this case in my code as implicitly clustered. However it is clearly explicitly NONCLUSTERED. I thinkClustered
property should befalse
in this case.Here are object properties for PK node:![image](https://github.com/microsoft/SqlScriptDOM/assets/13050317/624319e1-0c2b-492c-9460-4a6b668a5eb7)
So to check if index is clustered with respect to property nullability one has to do something like that:
feels like it could be more straightforward