Как мы можем вставить данные в столбец text [], используя gorm? - PullRequest
0 голосов
/ 05 июня 2019

Как мы можем вставить данные в столбец text [], используя gorm. Я трида, но нет решения. мой запрос gorm сгенерирован как

INSERT INTO "details" ("username","nickname","email","mobile","location","status","roleids","subid","camids","skl","ser","ts","brids","lan","createdat","createdby","modifiedby","modified") 
VALUES ('sample','test','',0,'','','[2 4]',0,'[2 4]',0,0,'[tr1 tr2]','[b1 b2]','','2019-06-05 10:47:50',0,0,'0001-01-01 00:00:00') 
RETURNING "details"."userid" 

Я ожидаю запрос типа:

INSERT INTO "details" ("username","nickname","email","mobile","location","status","roleids","subid","camids","skl","ser","ts","brids","lan","createdat","createdby","modifiedby","modified") 
VALUES ('sample','test','',0,'','',array[2, 4]',0,array[3, 4],0,0,array['tr1' 'tr2'],array['b1', 'b2'],'','2019-06-05 10:47:50',0,0,'0001-01-01 00:00:00') 
RETURNING "details"."userid" 

это будет выполнено в базе данных postgresql.

...