1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +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

@ -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)