Skip to content

Commit d0e58bb

Browse files
committed
Add descriptions to schema column documentation.
Signed-off-by: Bradley Grainger <[email protected]>
1 parent f3e7af7 commit d0e58bb

File tree

8 files changed

+95
-87
lines changed

8 files changed

+95
-87
lines changed

docs/content/overview/schema/columns.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@ title: Columns Schema
88

99
The `Columns` schema provides information about columns (in all tables).
1010

11-
Column Name | Data Type
12-
--- | ---
13-
TABLE_CATALOG | string
14-
TABLE_SCHEMA | string
15-
TABLE_NAME | string
16-
COLUMN_NAME | string
17-
ORDINAL_POSITION | uint
18-
COLUMN_DEFAULT | string
19-
IS_NULLABLE | string
20-
DATA_TYPE | string
21-
CHARACTER_MAXIMUM_LENGTH | long
22-
NUMERIC_PRECISION | ulong
23-
NUMERIC_SCALE | ulong
24-
DATETIME_PRECISION | uint
25-
CHARACTER_SET_NAME | string
26-
COLLATION_NAME | string
27-
COLUMN_TYPE | string
28-
COLUMN_KEY | string
29-
EXTRA | string
30-
PRIVILEGES | string
31-
COLUMN_COMMENT | string
32-
GENERATION_EXPRESSION | string
33-
SRS_ID | string
11+
Column Name | Data Type | Description
12+
--- | --- | ---
13+
TABLE_CATALOG | string |
14+
TABLE_SCHEMA | string |
15+
TABLE_NAME | string |
16+
COLUMN_NAME | string |
17+
ORDINAL_POSITION | uint |
18+
COLUMN_DEFAULT | string |
19+
IS_NULLABLE | string |
20+
DATA_TYPE | string |
21+
CHARACTER_MAXIMUM_LENGTH | long |
22+
NUMERIC_PRECISION | ulong |
23+
NUMERIC_SCALE | ulong |
24+
DATETIME_PRECISION | uint |
25+
CHARACTER_SET_NAME | string |
26+
COLLATION_NAME | string |
27+
COLUMN_TYPE | string |
28+
COLUMN_KEY | string |
29+
EXTRA | string |
30+
PRIVILEGES | string |
31+
COLUMN_COMMENT | string |
32+
GENERATION_EXPRESSION | string |
33+
SRS_ID | string |
3434

3535
The following restrictions are supported:
3636

docs/content/overview/schema/datatypes.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@ title: DataTypes Schema
88

99
The `DataTypes` schema provides information about available data types.
1010

11-
Column Name | Data Type
12-
--- | ---
13-
TypeName | string
14-
ProviderDbType | int
15-
ColumnSize | long
16-
CreateFormat | string
17-
CreateParameters | string
18-
DataType | string
19-
IsAutoIncrementable | bool
20-
IsBestMatch | bool
21-
IsCaseSensitive | bool
22-
IsFixedLength | bool
23-
IsFixedPrecisionScale | bool
24-
IsLong | bool
25-
IsNullable | bool
26-
IsSearchable | bool
27-
IsSearchableWithLike | bool
28-
IsUnsigned | bool
29-
MaximumScale | short
30-
MinimumScale | short
31-
IsConcurrencyType | bool
32-
IsLiteralSupported | bool
33-
LiteralPrefix | string
34-
LiteralSuffix | string
35-
NativeDataType | string
11+
Column Name | Data Type | Description
12+
--- | --- | ---
13+
TypeName | string |
14+
ProviderDbType | int |
15+
ColumnSize | long |
16+
CreateFormat | string |
17+
CreateParameters | string |
18+
DataType | string |
19+
IsAutoIncrementable | bool |
20+
IsBestMatch | bool |
21+
IsCaseSensitive | bool |
22+
IsFixedLength | bool |
23+
IsFixedPrecisionScale | bool |
24+
IsLong | bool |
25+
IsNullable | bool |
26+
IsSearchable | bool |
27+
IsSearchableWithLike | bool |
28+
IsUnsigned | bool |
29+
MaximumScale | short |
30+
MinimumScale | short |
31+
IsConcurrencyType | bool |
32+
IsLiteralSupported | bool |
33+
LiteralPrefix | string |
34+
LiteralSuffix | string |
35+
NativeDataType | string |
3636

docs/content/overview/schema/metadatacollections.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ title: MetaDataCollections Schema
88

99
The `MetaDataCollections` schema provides information about available schemas.
1010

11-
Column Name | Data Type
12-
--- | ---
13-
CollectionName | string
14-
NumberOfRestrictions | int
15-
NumberOfIdentifierParts | int
11+
Column Name | Data Type | Description
12+
--- | --- | ---
13+
CollectionName | string | The name of the collection to pass to the GetSchema method to return the collection.
14+
NumberOfRestrictions | int | The number of restrictions that may be specified for the collection.
15+
NumberOfIdentifierParts | int | The number of parts in the composite identifier/database object name.
1616

docs/content/overview/schema/procedures.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ title: Procedures Schema
88

99
The `Procedures` schema provides information about stored procedures.
1010

11-
Column Name | Data Type
12-
--- | ---
13-
SPECIFIC_NAME | string
14-
ROUTINE_CATALOG | string
15-
ROUTINE_SCHEMA | string
16-
ROUTINE_NAME | string
17-
ROUTINE_TYPE | string
18-
DTD_IDENTIFIER | string
19-
ROUTINE_BODY | string
20-
ROUTINE_DEFINITION | string
21-
EXTERNAL_NAME | string
22-
EXTERNAL_LANGUAGE | string
23-
PARAMETER_STYLE | string
24-
IS_DETERMINISTIC | string
25-
SQL_DATA_ACCESS | string
26-
SQL_PATH | string
27-
SECURITY_TYPE | string
28-
CREATED | DateTime
29-
LAST_ALTERED | DateTime
30-
SQL_MODE | string
31-
ROUTINE_COMMENT | string
32-
DEFINER | string
11+
Column Name | Data Type | Description
12+
--- | --- | ---
13+
SPECIFIC_NAME | string |
14+
ROUTINE_CATALOG | string |
15+
ROUTINE_SCHEMA | string |
16+
ROUTINE_NAME | string |
17+
ROUTINE_TYPE | string |
18+
DTD_IDENTIFIER | string |
19+
ROUTINE_BODY | string |
20+
ROUTINE_DEFINITION | string |
21+
EXTERNAL_NAME | string |
22+
EXTERNAL_LANGUAGE | string |
23+
PARAMETER_STYLE | string |
24+
IS_DETERMINISTIC | string |
25+
SQL_DATA_ACCESS | string |
26+
SQL_PATH | string |
27+
SECURITY_TYPE | string |
28+
CREATED | DateTime |
29+
LAST_ALTERED | DateTime |
30+
SQL_MODE | string |
31+
ROUTINE_COMMENT | string |
32+
DEFINER | string |
3333

docs/content/overview/schema/reservedwords.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: ReservedWords Schema
88

99
The `ReservedWords` schema provides information about reserved words in the server's SQL syntax.
1010

11-
Column Name | Data Type
12-
--- | ---
13-
ReservedWord | string
11+
Column Name | Data Type | Description
12+
--- | --- | ---
13+
ReservedWord | string |
1414

docs/content/overview/schema/restrictions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ title: Restrictions Schema
88

99
The `Restrictions` schema provides information about the restrictions supported when retrieving schemas.
1010

11-
Column Name | Data Type
12-
--- | ---
13-
CollectionName | string
14-
RestrictionName | string
15-
RestrictionDefault | string
16-
RestrictionNumber | int
11+
Column Name | Data Type | Description
12+
--- | --- | ---
13+
CollectionName | string | The name of the collection that these restrictions apply to.
14+
RestrictionName | string | The name of the restriction in the collection.
15+
RestrictionDefault | string | Ignored.
16+
RestrictionNumber | int | The actual location in the collections restrictions that this particular restriction falls in.
1717

tools/SchemaCollectionGenerator/SchemaCollectionGenerator.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ public async ValueTask<DataTable> GetSchemaAsync(IOBehavior ioBehavior, string c
179179
180180
The `{schema.Name}` schema provides {schema.Description}.
181181
182-
Column Name | Data Type
183-
--- | ---
182+
Column Name | Data Type | Description
183+
--- | --- | ---
184184
");
185185
foreach (var column in schema.Columns)
186-
schemaDocWriter.WriteLine($@"{column.Name} | {column.Type}");
186+
schemaDocWriter.WriteLine($@"{column.Name} | {column.Type} | {column.Description}");
187187
schemaDocWriter.WriteLine();
188188

189189
if (schema.Restrictions is { Count: > 0 })
@@ -217,6 +217,7 @@ class Column
217217
public string Name { get; set; }
218218
[AllowNull]
219219
public string Type { get; set; }
220+
public string? Description { get; set; }
220221
public bool Optional { get; set; }
221222
}
222223

tools/SchemaCollectionGenerator/SchemaCollections.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
columns:
44
- name: CollectionName
55
type: string
6+
description: The name of the collection to pass to the GetSchema method to return the collection.
67
- name: NumberOfRestrictions
78
type: int
9+
description: The number of restrictions that may be specified for the collection.
810
- name: NumberOfIdentifierParts
911
type: int
12+
description: The number of parts in the composite identifier/database object name.
1013

1114
- name: CharacterSets
1215
table: CHARACTER_SETS
@@ -530,12 +533,16 @@
530533
columns:
531534
- name: CollectionName
532535
type: string
536+
description: The name of the collection that these restrictions apply to.
533537
- name: RestrictionName
534538
type: string
539+
description: The name of the restriction in the collection.
535540
- name: RestrictionDefault
536541
type: string
542+
description: Ignored.
537543
- name: RestrictionNumber
538544
type: int
545+
description: The actual location in the collections restrictions that this particular restriction falls in.
539546

540547
- name: SchemaPrivileges
541548
table: SCHEMA_PRIVILEGES

0 commit comments

Comments
 (0)