Skip to content

Commit 7ac386d

Browse files
authored
Merge pull request #82 from ahmczsy/master
insert optimize
2 parents a0757bb + b8c3660 commit 7ac386d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/ckgroup/ckconn.go

+3
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ func (client *ckConn) Insert(query string, sliceData interface{}) error {
292292
}
293293
argss = append(argss, args)
294294
}
295+
if len(argss) == 0 {
296+
return nil
297+
}
295298
now := time.Now()
296299
err := saveData(client.Conn, insertSQL, argss)
297300
db, table := parseInsertSQLTableName(insertSQL)

0 commit comments

Comments
 (0)