1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 21:29:42 +02:00

Fixed SQL Server JSON support

Closes #298
This commit is contained in:
sauls8t 2019-07-18 10:14:41 -04:00
parent 69077ce419
commit b31f330c41
5 changed files with 1067 additions and 1065 deletions

View file

@ -110,6 +110,7 @@ func (h *Handler) SetSMTP(w http.ResponseWriter, r *http.Request) {
}
cfg := GetSMTPConfig(h.Store)
h.Runtime.Log.Infof("%v", cfg)
dialer, err := smtp.Connect(cfg)
em := smtp.EmailMessage{}
em.Subject = "Documize SMTP Test"

View file

@ -16,8 +16,9 @@ import (
"database/sql"
"fmt"
"github.com/documize/community/domain/store"
"github.com/pkg/errors"
"github.com/documize/community/domain/store"
)
// Store provides data access to user permission information.

View file

@ -41,8 +41,8 @@ func main() {
rt.Product = domain.Product{}
rt.Product.Major = "3"
rt.Product.Minor = "1"
rt.Product.Patch = "0"
rt.Product.Revision = "190629131646"
rt.Product.Patch = "1"
rt.Product.Revision = "190718095543"
rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch)
rt.Product.Edition = domain.CommunityEdition
rt.Product.Title = fmt.Sprintf("%s Edition", rt.Product.Edition)

View file

@ -329,7 +329,7 @@ func (p SQLServerProvider) JSONEmpty() string {
// Typically used in SELECT <my_json_field> query.
func (p SQLServerProvider) JSONGetValue(column, attribute string) string {
if len(attribute) > 0 {
return fmt.Sprintf("JSON_VALUE(%s, '$.%s'", column, attribute)
return fmt.Sprintf("JSON_VALUE(%s, '$.%s')", column, attribute)
}
return fmt.Sprintf("JSON_QUERY(%s)", column)

File diff suppressed because one or more lines are too long