Skip to content

Commit e0bf3f0

Browse files
committed
Generate Restrictions documentation.
Signed-off-by: Bradley Grainger <[email protected]>
1 parent 655391e commit e0bf3f0

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docs/content/overview/schema/columns.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ COLUMN_COMMENT | string
3232
GENERATION_EXPRESSION | string
3333
SRS_ID | string
3434

35+
The following restrictions are supported:
36+
37+
Restriction Name | Restriction Default | Restriction Number
38+
--- | --- | --:
39+
Catalog | TABLE_CATALOG | 1
40+
Schema | TABLE_SCHEMA | 2
41+
Table | TABLE_NAME | 3
42+
Column | COLUMN_NAME | 4
43+

tools/SchemaCollectionGenerator/SchemaCollectionGenerator.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ Column Name | Data Type
174174
foreach (var column in schema.Columns)
175175
schemaDocWriter.WriteLine($@"{column.Name} | {column.Type}");
176176
schemaDocWriter.WriteLine();
177+
178+
if (schema.Restrictions is { Count: > 0 })
179+
{
180+
schemaDocWriter.Write(@"The following restrictions are supported:
181+
182+
Restriction Name | Restriction Default | Restriction Number
183+
--- | --- | --:
184+
");
185+
for (var i = 0; i < schema.Restrictions.Count; i++)
186+
schemaDocWriter.WriteLine($@"{schema.Restrictions[i].Name} | {schema.Restrictions[i].Default} | {i + 1}");
187+
schemaDocWriter.WriteLine();
188+
}
177189
}
178190

179191
class Schema

0 commit comments

Comments
 (0)