|
@@ -101,15 +101,15 @@ func formInsertTableRow(e any, tableRows *sql_tpl.TableRows) error {
|
|
|
}
|
|
|
|
|
|
if element.FieldValueElem.Len() == 0 {
|
|
|
- continue
|
|
|
- }
|
|
|
-
|
|
|
- strValues := make([]string, 0, 0)
|
|
|
- for i := 0; i < element.FieldValueElem.Len(); i++ {
|
|
|
- strValues = append(strValues, element.FieldValueElem.Index(i).String())
|
|
|
+ value = ""
|
|
|
+ } else {
|
|
|
+ strValues := make([]string, 0, 0)
|
|
|
+ for i := 0; i < element.FieldValueElem.Len(); i++ {
|
|
|
+ strValues = append(strValues, element.FieldValueElem.Index(i).String())
|
|
|
+ }
|
|
|
+
|
|
|
+ value = strings.Join(strValues, element.JoinWith)
|
|
|
}
|
|
|
-
|
|
|
- value = strings.Join(strValues, element.JoinWith)
|
|
|
}
|
|
|
|
|
|
var opts []sql_tpl.AfterParsedStrValueOption
|
|
@@ -289,15 +289,15 @@ func formUpdateTableRowsAndConditions(e any, tableRows *sql_tpl.TableRows, condi
|
|
|
}
|
|
|
|
|
|
if element.FieldValueElem.Len() == 0 {
|
|
|
- continue
|
|
|
- }
|
|
|
-
|
|
|
- strValues := make([]string, 0, 0)
|
|
|
- for i := 0; i < element.FieldValueElem.Len(); i++ {
|
|
|
- strValues = append(strValues, element.FieldValueElem.Index(i).String())
|
|
|
+ value = ""
|
|
|
+ } else {
|
|
|
+ strValues := make([]string, 0, 0)
|
|
|
+ for i := 0; i < element.FieldValueElem.Len(); i++ {
|
|
|
+ strValues = append(strValues, element.FieldValueElem.Index(i).String())
|
|
|
+ }
|
|
|
+
|
|
|
+ value = strings.Join(strValues, element.JoinWith)
|
|
|
}
|
|
|
-
|
|
|
- value = strings.Join(strValues, element.JoinWith)
|
|
|
}
|
|
|
|
|
|
if fieldName == lastUpdatedTimeFieldName &&
|