Я пытаюсь сканировать список postgresql на пустой фрагмент строки. Однако я получаю следующее сообщение об ошибке: Failed creating education: sql: Scan error on column index 14, name "descriptions": unsupported Scan, storing driver.Value type string into type *[]*string
. Похоже, мне нужно как-то настроить сканер, но как мне это сделать с белкой? спасибо.
Вот как я строю запрос:
squirrel.StatementBuilder.PlaceholderFormat(squirrel.Dollar).RunWith(db).Insert("educations").
Columns("id", "school", "city", "state", "degree", "month_start", "year_start", "month_end", "year_end", "\"order\"", "logo_url", "created_at", "updated_at", "style", "descriptions").
Values(
uuid.Must(uuid.NewV4()).String(),
education.School,
education.City,
education.State,
education.Degree,
education.MonthStart,
education.YearStart,
education.MonthEnd,
education.YearEnd,
education.Order,
education.LogoURL,
currentTime,
currentTime,
savedStyle.ID,
pq.Array(education.Descriptions),
).
Suffix("RETURNING *").
Scan(
&savedEducation.ID,
&savedEducation.School,
&savedEducation.City,
&savedEducation.State,
&savedEducation.Degree,
&savedEducation.MonthStart,
&savedEducation.YearStart,
&savedEducation.MonthEnd,
&savedEducation.YearEnd,
&savedEducation.Order,
&savedEducation.LogoURL,
&savedEducation.CreatedAt,
&savedEducation.UpdatedAt,
&ignored,
&savedEducation.Descriptions,
)