File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,17 @@ exports.initialise = async (context) => {
115
115
columns . forEach ( column => {
116
116
const item = new vscode . CompletionItem ( column . COLUMN_NAME . toLowerCase ( ) , vscode . CompletionItemKind . Field ) ;
117
117
item . insertText = new vscode . SnippetString ( column . COLUMN_NAME . toLowerCase ( ) ) ;
118
- item . detail = column . DATA_TYPE ;
118
+
119
+ let detail = null , length ;
120
+ if ( [ `DECIMAL` , `ZONED` ] . includes ( column . DATA_TYPE ) ) {
121
+ length = column . NUMERIC_PRECISION || null ;
122
+ detail = `${ column . DATA_TYPE } ${ length ? `(${ length } ${ column . NUMERIC_PRECISION ? `, ${ column . NUMERIC_SCALE } ` : `` } )` : `` } `
123
+ } else {
124
+ length = column . CHARACTER_MAXIMUM_LENGTH || null ;
125
+ detail = `${ column . DATA_TYPE } ${ length ? `(${ length } )` : `` } `
126
+ }
127
+
128
+ item . detail = detail ;
119
129
item . documentation = new vscode . MarkdownString ( `${ column . COLUMN_TEXT } (\`${ definedAs . db } .${ definedAs . table } \`)` ) ;
120
130
items . push ( item ) ;
121
131
} ) ;
You can’t perform that action at this time.
0 commit comments