update sqlc gen
This commit is contained in:
parent
79b803bc96
commit
c06e955c6a
@ -1630,7 +1630,7 @@ func (q *Queries) GetFieldByAmoID(ctx context.Context, amoid int32) (Field, erro
|
|||||||
|
|
||||||
const getFieldsWithPagination = `-- name: GetFieldsWithPagination :many
|
const getFieldsWithPagination = `-- name: GetFieldsWithPagination :many
|
||||||
SELECT f.id, f.amoid, f.code, f.accountid, f.name, f.entity, f.type, f.deleted, f.createdat, COUNT(*) OVER() as total_count
|
SELECT f.id, f.amoid, f.code, f.accountid, f.name, f.entity, f.type, f.deleted, f.createdat, COUNT(*) OVER() as total_count
|
||||||
FROM fields f JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1) u ON f.AccountID = u.AmoID
|
FROM fields f JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1 AND Deleted = false) u ON f.AccountID = u.AmoID
|
||||||
WHERE f.Deleted = false
|
WHERE f.Deleted = false
|
||||||
ORDER BY f.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
ORDER BY f.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
||||||
`
|
`
|
||||||
@ -1746,7 +1746,7 @@ func (q *Queries) GetListStartQuiz(ctx context.Context, accountid string) ([]int
|
|||||||
|
|
||||||
const getPipelinesWithPagination = `-- name: GetPipelinesWithPagination :many
|
const getPipelinesWithPagination = `-- name: GetPipelinesWithPagination :many
|
||||||
SELECT p.id, p.amoid, p.accountid, p.name, p.isarchive, p.deleted, p.createdat, COUNT(*) OVER() as total_count
|
SELECT p.id, p.amoid, p.accountid, p.name, p.isarchive, p.deleted, p.createdat, COUNT(*) OVER() as total_count
|
||||||
FROM pipelines p JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1) u ON p.AccountID = u.AmoID
|
FROM pipelines p JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1 AND Deleted = false) u ON p.AccountID = u.AmoID
|
||||||
WHERE p.Deleted = false
|
WHERE p.Deleted = false
|
||||||
ORDER BY p.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
ORDER BY p.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
||||||
`
|
`
|
||||||
@ -2363,7 +2363,7 @@ func (q *Queries) GetResultAnswers(ctx context.Context, id int64) ([]GetResultAn
|
|||||||
|
|
||||||
const getStepsWithPagination = `-- name: GetStepsWithPagination :many
|
const getStepsWithPagination = `-- name: GetStepsWithPagination :many
|
||||||
SELECT s.id, s.amoid, s.pipelineid, s.accountid, s.name, s.color, s.deleted, s.createdat, COUNT(*) OVER() as total_count
|
SELECT s.id, s.amoid, s.pipelineid, s.accountid, s.name, s.color, s.deleted, s.createdat, COUNT(*) OVER() as total_count
|
||||||
FROM steps s JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1) u ON s.AccountID = u.AmoID
|
FROM steps s JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1 AND Deleted = false) u ON s.AccountID = u.AmoID
|
||||||
WHERE s.Deleted = false AND PipelineID = $4
|
WHERE s.Deleted = false AND PipelineID = $4
|
||||||
ORDER BY s.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
ORDER BY s.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
||||||
`
|
`
|
||||||
@ -2427,7 +2427,7 @@ func (q *Queries) GetStepsWithPagination(ctx context.Context, arg GetStepsWithPa
|
|||||||
|
|
||||||
const getTagsWithPagination = `-- name: GetTagsWithPagination :many
|
const getTagsWithPagination = `-- name: GetTagsWithPagination :many
|
||||||
SELECT t.id, t.amoid, t.accountid, t.entity, t.name, t.color, t.deleted, t.createdat, COUNT(*) OVER() as total_count
|
SELECT t.id, t.amoid, t.accountid, t.entity, t.name, t.color, t.deleted, t.createdat, COUNT(*) OVER() as total_count
|
||||||
FROM tags t JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1) u ON t.AccountID = u.AmoID
|
FROM tags t JOIN (SELECT AmoID FROM users WHERE users.AccountID = $1 AND Deleted = false) u ON t.AccountID = u.AmoID
|
||||||
WHERE t.Deleted = false
|
WHERE t.Deleted = false
|
||||||
ORDER BY t.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
ORDER BY t.ID OFFSET ($2 - 1) * $3 LIMIT $3
|
||||||
`
|
`
|
||||||
|
Loading…
Reference in New Issue
Block a user