mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:57:31 +00:00
test(queries): org prepare funcs (#2647)
* chore(queries): test suite for prepare stmt funcs * test(queries): prepare project funcs * refactor: add comments * test: simlify expected sql, added possibility to add args to expected queries * test(queries): prepare funcs in org * chore(backend): correct modules
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"github.com/Masterminds/squirrel"
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
@@ -89,13 +88,13 @@ func (q *Queries) GetActionsByFlowAndTriggerType(ctx context.Context, flowType d
|
||||
}
|
||||
|
||||
func (q *Queries) GetFlowTypesOfActionID(ctx context.Context, actionID string) ([]domain.FlowType, error) {
|
||||
stmt, args, err := squirrel.StatementBuilder.
|
||||
stmt, args, err := sq.StatementBuilder.
|
||||
Select(FlowsTriggersColumnFlowType.identifier()).
|
||||
From(flowsTriggersTable.identifier()).
|
||||
Where(sq.Eq{
|
||||
FlowsTriggersColumnActionID.identifier(): actionID,
|
||||
}).
|
||||
PlaceholderFormat(squirrel.Dollar).
|
||||
PlaceholderFormat(sq.Dollar).
|
||||
ToSql()
|
||||
if err != nil {
|
||||
return nil, errors.ThrowInvalidArgument(err, "QUERY-Dh311", "Errors.Query.InvalidRequest")
|
||||
|
Reference in New Issue
Block a user