sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

Postgresql function sqlx error missing destination name register in *models.RegisterResp

Open Jimmy99 opened this issue 7 years ago • 1 comments

My sqlx snippet: err = db.Get(&returnRegister,"SELECT membership.register($1,$2,$3)",m.New_email, m.Pass, m.Confirm)

My sqlx error: missing destination name register in *models.RegisterResp This type of error is usually where the struct does not have a corresponding field defined, but in this case the missing destination name is the name of the Postgresql function? Any ideas on what is wrong?

Jimmy99 avatar Mar 27 '19 09:03 Jimmy99

I got same error.

you can try

err = db.Get(&returnRegister,"SELECT * FROM membership.register($1,$2,$3)",m.New_email, m.Pass, m.Confirm)

kitamura-tetsuo avatar Sep 28 '19 07:09 kitamura-tetsuo