Open dennissetiawan opened 12 months ago
I want to insert array to the table , the following code does not work.
insertMap := map[string]interface{}{ order_column_id: input.OrderID, order_column_assigned_users: []string{userID}, } query, args, err := sq.Insert(ORDER_TABLE). SetMap(insertMap). PlaceholderFormat(sq.Dollar). ToSql()
Please help me on:
EDIT:
insertMap := map[string]interface{}{ order_column_id: input.OrderID, order_column_assigned_users: sq.Expr("ARRAY[?]", userID), }
works but notice that if i use .Insert.Values(orderID , sq.Expr("ARRAY[?]",userID) ) It does not work.
.Insert.Values(orderID , sq.Expr("ARRAY[?]",userID) )
I want to insert array to the table , the following code does not work.
Please help me on:
EDIT:
works but notice that if i use
.Insert.Values(orderID , sq.Expr("ARRAY[?]",userID) )
It does not work.