mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-21 04:18:46 +00:00
refactor: relational organization projection to use repository (#11621)
- Transitioned from using `handler.Statements` to a repository pattern for managing organization data in migrations. - Introduced a new method to set the updated timestamp for organizations. - Updated the projection logic to utilize the repository for creating, updating, and deleting organization records.
This commit is contained in:
@@ -69,7 +69,9 @@ func (i idpIntentRepository) Create(ctx context.Context, client database.QueryEx
|
||||
}
|
||||
|
||||
builder := new(database.StatementBuilder)
|
||||
builder.WriteString(`INSERT INTO ` + i.qualifiedTableName() + ` (instance_id, id, success_url, failure_url, idp_id, idp_arguments, created_at, updated_at) VALUES ( `)
|
||||
builder.WriteString(`INSERT INTO `)
|
||||
builder.WriteString(i.qualifiedTableName())
|
||||
builder.WriteString(` (instance_id, id, success_url, failure_url, idp_id, idp_arguments, created_at, updated_at) VALUES ( `)
|
||||
builder.WriteArgs(intent.InstanceID, intent.ID, intent.SuccessURL.String(), intent.FailureURL.String(), intent.IDPID, intent.IDPArguments, createdAt, updatedAt)
|
||||
builder.WriteString(` ) RETURNING created_at, updated_at`)
|
||||
return client.QueryRow(ctx, builder.String(), builder.Args()...).Scan(&intent.CreatedAt, &intent.UpdatedAt)
|
||||
|
||||
Reference in New Issue
Block a user