docs: clarify comments based on review
This commit is contained in:
parent
a9dcd020c6
commit
8a24304556
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 The Xorm Authors. All rights reserved.
|
||||
// Copyright 2025 The Xorm Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
|
@ -1012,7 +1012,7 @@ func (g *gbase8sDriver) GenScanResult(colType string) (interface{}, error) {
|
|||
var s sql.NullBool
|
||||
return &s, nil
|
||||
default:
|
||||
// 检查是否是 DATETIME YEAR TO FRACTION 的变体
|
||||
// Check whether it is a variant of DATETIME YEAR TO FRACTION
|
||||
if strings.Contains(colType, "DATETIME") && strings.Contains(colType, "FRACTION") {
|
||||
var s sql.NullTime
|
||||
return &s, nil
|
||||
|
@ -1082,7 +1082,7 @@ func inSlice(target string, list []string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// 用正则将所有连续的空白字符替换成一个空格
|
||||
// Replace all consecutive whitespace characters with a single space using regex
|
||||
func compressStr(s string) string {
|
||||
re := regexp.MustCompile(`\s+`)
|
||||
return strings.TrimSpace(re.ReplaceAllString(s, " "))
|
||||
|
|
Loading…
Reference in New Issue