Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sanrentai opened this issue Feb 21, 2025 · 0 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it.

Comments

@sanrentai
Copy link
Contributor

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"}

@sanrentai sanrentai added the bug It is confirmed a bug, but don't worry, we'll handle it. label Feb 21, 2025
@Issues-translate-bot Issues-translate-bot changed the title drivers/dm/v2: 达梦数据库,多行原生sql语句执行时换行符被删除了dm_do_filter.go drivers/dm/v2: Dameng database, line breaks are deleted when multi-line native sql statements are executed dm_do_filter.go Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it.
Projects
None yet
Development

No branches or pull requests

1 participant