sqlx
sqlx copied to clipboard
Postgresql function sqlx error missing destination name register in *models.RegisterResp
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?
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)