Skip to content

drivers/dm/v2: Dameng database, line breaks are deleted when multi-line native sql statements are executed dm_do_filter.go #4163

@sanrentai

Description

@sanrentai

Go version

go1.23.4 windows/amd64

GoFrame version

2.8.3

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

package main

import (
	"fmt"

	_ "github.com/gogf/gf/contrib/drivers/dm/v2"

	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gctx"
)

func main() {
	re, err := g.DB().GetOne(gctx.New(), `select
convert(decimal(18,6),3.1400) a`)
	if err != nil {
		fmt.Println("err=", err)
	}
	g.Log().Info(gctx.New(), re)
}

What did you see happen?

err= selectconvert(decimal(18,6),3.1400) a: Error -2007: 第 1 行, 第 34 列[decimal]附近出现错误:

What did you expect to see?

{“a”:"3.14"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt is confirmed a bug, but don't worry, we'll handle it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions