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

gorm can't support doris? #7088

Open
zong400 opened this issue Jun 26, 2024 · 0 comments
Open

gorm can't support doris? #7088

zong400 opened this issue Jun 26, 2024 · 0 comments
Assignees
Labels
type:question general questions

Comments

@zong400
Copy link

zong400 commented Jun 26, 2024

Your Question

my code:

	var ad FlowAdUrlStat

	stmt := db.Session(&gorm.Session{DryRun: true}).Where("opt_YYYYMMDD = ?", 20240626).Take(&ad).Statement
	fmt.Println(stmt.SQL.String()) 
	fmt.Println(stmt.Vars)         

	if err := db.Where("opt_YYYYMMDD = ?", 20240626).Take(&ad).Error; err != nil {
		log.Fatal(err)
	}

	fmt.Println(ad)

output:

Type 'dlv help' for list of commands.
SELECT * FROM flow_ad_url_stat WHERE opt_YYYYMMDD = ? LIMIT ?
[20240626 1]
2024/06/26 18:07:03 Error 1105 (HY000): errCode = 2, detailMessage = Syntax error in line 1:
...RE opt_YYYYMMDD = ? LIMIT ?
^
Encountered: ?
Expected

2024/06/26 18:07:03 D:/goproject/cloudsvc/dbutils/mysqlutil.go:63 Error 1105 (HY000): errCode = 2, detailMessage = Syntax error in line 1:
...RE opt_YYYYMMDD = ? LIMIT ?
^
Encountered: ?
Expected

[58.356ms] [rows:0] SELECT * FROM flow_ad_url_stat WHERE opt_YYYYMMDD = 20240626 LIMIT 1
Process 48512 has exited with status 1
Detaching

@zong400 zong400 added the type:question general questions label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question general questions
Projects
None yet
Development

No branches or pull requests

2 participants