@@ -639,8 +639,8 @@ func toSqlInsert(input chan *FileJob) string {
639
639
640
640
dir , _ := filepath .Split (res .Location )
641
641
642
- str .WriteString (fmt .Sprintf ("\n insert into t values('%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d);" ,
643
- projectName , res .Language , res .Location , dir , res .Filename , res .Bytes , res .Blank , res .Comment , res .Code , res .Complexity ))
642
+ str .WriteString (fmt .Sprintf ("\n insert into t values('%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d, %d );" ,
643
+ projectName , res .Language , res .Location , dir , res .Filename , res .Bytes , res .Blank , res .Comment , res .Code , res .Complexity , res . Uloc ))
644
644
645
645
// every 1000 files commit and start a new transaction to avoid overloading
646
646
if count == 1000 {
@@ -649,9 +649,7 @@ func toSqlInsert(input chan *FileJob) string {
649
649
count = 0
650
650
}
651
651
}
652
- if count != 1000 {
653
- str .WriteString ("\n commit;" )
654
- }
652
+ str .WriteString ("\n commit;" )
655
653
656
654
currentTime := time .Now ()
657
655
es := float64 (makeTimestampMilli ()- startTimeMilli ) * 0.001
@@ -679,7 +677,9 @@ create table t (
679
677
nBlank integer,
680
678
nComment integer,
681
679
nCode integer,
682
- nComplexity integer );` )
680
+ nComplexity integer,
681
+ nUloc integer
682
+ );` )
683
683
684
684
str .WriteString (toSqlInsert (input ))
685
685
return str .String ()
0 commit comments