update sqlc gen
This commit is contained in:
parent
80771c0493
commit
f9eec59ce1
@ -1048,7 +1048,7 @@ RETURNING p.id, p.privilegeID, p.account_id, p.privilege_name, p.amount, p.creat
|
||||
|
||||
-- name: GetExistingContactAmo :many
|
||||
WITH getAmoID AS (
|
||||
SELECT AmoID FROM amoContact WHERE amoContact.AccountID = $1 AND amoContact.Field IN ($2)
|
||||
SELECT AmoID FROM amoContact WHERE amoContact.AccountID = $1 AND amoContact.Field IN ($2::text[])
|
||||
) SELECT DISTINCT * FROM amoContact
|
||||
WHERE amoContact.AccountID = $1 AND amoContact.AmoID IN (SELECT AmoID FROM getAmoID);
|
||||
|
||||
|
||||
@ -1451,18 +1451,18 @@ func (q *Queries) GetCurrentCompany(ctx context.Context, accountid string) (Acco
|
||||
|
||||
const getExistingContactAmo = `-- name: GetExistingContactAmo :many
|
||||
WITH getAmoID AS (
|
||||
SELECT AmoID FROM amoContact WHERE amoContact.AccountID = $1 AND amoContact.Field IN ($2)
|
||||
SELECT AmoID FROM amoContact WHERE amoContact.AccountID = $1 AND amoContact.Field IN ($2::text[])
|
||||
) SELECT DISTINCT id, accountid, amoid, field FROM amoContact
|
||||
WHERE amoContact.AccountID = $1 AND amoContact.AmoID IN (SELECT AmoID FROM getAmoID)
|
||||
`
|
||||
|
||||
type GetExistingContactAmoParams struct {
|
||||
Accountid int32 `db:"accountid" json:"accountid"`
|
||||
Field string `db:"field" json:"field"`
|
||||
Accountid int32 `db:"accountid" json:"accountid"`
|
||||
Column2 []string `db:"column_2" json:"column_2"`
|
||||
}
|
||||
|
||||
func (q *Queries) GetExistingContactAmo(ctx context.Context, arg GetExistingContactAmoParams) ([]Amocontact, error) {
|
||||
rows, err := q.db.QueryContext(ctx, getExistingContactAmo, arg.Accountid, arg.Field)
|
||||
rows, err := q.db.QueryContext(ctx, getExistingContactAmo, arg.Accountid, pq.Array(arg.Column2))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user