Model sql tags.

This commit is contained in:
go-jet 2019-06-12 12:47:30 +02:00
parent 367602757f
commit c598978ba6
10 changed files with 110 additions and 67 deletions

View file

@ -3,6 +3,7 @@ package sqlbuilder
import (
"bytes"
"github.com/google/uuid"
"github.com/lib/pq"
"strconv"
"strings"
"time"
@ -223,7 +224,7 @@ func ArgToString(value interface{}) string {
case uuid.UUID:
return stringQuote(bindVal.String())
case time.Time:
return stringQuote(bindVal.String())
return stringQuote(string(pq.FormatTimestamp(bindVal)))
default:
return "[Unknown type]"
}