Closed zzy2210 closed 1 year ago
You might try it like this:
return gorm.Open(postgres.New(postgres.Config{
DSN: fmt.Sprintf(dsnLayout, ip, user, password,dbname,port),
PreferSimpleProtocol: true, // disables implicit prepared statement usage
DriverName: "opengauss",
}), &gorm.Config{})
You might try it like this:
return gorm.Open(postgres.New(postgres.Config{ DSN: fmt.Sprintf(dsnLayout, ip, user, password,dbname,port), PreferSimpleProtocol: true, // disables implicit prepared statement usage DriverName: "opengauss", }), &gorm.Config{})
thanks~ i will try it
Closing the issue since it is not related to this repository.
Your Question
I tried to use other drivers by way of the “drivername” parameter.
but it return error "sql: unknown driver"
What should I do?
The document you expected this should be explained
the code like :
Expected answer