File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
website/src/languages/helpers Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -250,9 +250,8 @@ const getSyntaxCompletionItems = async (
250250 : tableNameAliasMap [ tb . text ] ;
251251 return (
252252 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 ) ;
256255 return {
257256 label :
258257 column . text +
@@ -274,11 +273,12 @@ const getSyntaxCompletionItems = async (
274273 // 如果有多个重名字段,则插入的字段自动包含表名
275274 fromTableColumns = fromTableColumns . map ( ( column ) => {
276275 const columnRepeatCount =
277- columnRepeatCountMap . get ( column . label as string ) || 0 ;
276+ columnRepeatCountMap . get ( column . _columnText as string ) || 0 ;
278277 const isFromMultipleTables = fromTables . length > 1 ;
279278 return columnRepeatCount > 1 && isFromMultipleTables
280279 ? {
281280 ...column ,
281+ label : `${ column . _tableName } .${ column . label } ` ,
282282 insertText : `${ column . _tableName } .${ column . _columnText } `
283283 }
284284 : column ;
You can’t perform that action at this time.
0 commit comments