File tree 1 file changed +4
-4
lines changed
website/src/languages/helpers
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -250,9 +250,8 @@ const getSyntaxCompletionItems = async (
250
250
: tableNameAliasMap [ tb . text ] ;
251
251
return (
252
252
tb . columns ?. map ( ( column ) => {
253
- const columnName = column . text ;
254
- const repeatCount = columnRepeatCountMap . get ( columnName ) || 0 ;
255
- columnRepeatCountMap . set ( columnName , repeatCount + 1 ) ;
253
+ const repeatCount = columnRepeatCountMap . get ( column . text ) || 0 ;
254
+ columnRepeatCountMap . set ( column . text , repeatCount + 1 ) ;
256
255
return {
257
256
label :
258
257
column . text +
@@ -274,11 +273,12 @@ const getSyntaxCompletionItems = async (
274
273
// 如果有多个重名字段,则插入的字段自动包含表名
275
274
fromTableColumns = fromTableColumns . map ( ( column ) => {
276
275
const columnRepeatCount =
277
- columnRepeatCountMap . get ( column . label as string ) || 0 ;
276
+ columnRepeatCountMap . get ( column . _columnText as string ) || 0 ;
278
277
const isFromMultipleTables = fromTables . length > 1 ;
279
278
return columnRepeatCount > 1 && isFromMultipleTables
280
279
? {
281
280
...column ,
281
+ label : `${ column . _tableName } .${ column . label } ` ,
282
282
insertText : `${ column . _tableName } .${ column . _columnText } `
283
283
}
284
284
: column ;
You can’t perform that action at this time.
0 commit comments