mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-18 03:15:11 +00:00
chore: merge (#5773)
* feat: allow skip of success page for native apps (#5627) add possibility to return to callback directly after login without rendering the successful login page * build next * fix(console): disallow inline fonts, critical styles (#5714) fix: disallow inline * fix(setup): step 10 for postgres (#5717) * fix(setup): smaller transactions (#5743) * fix: order by sequence by default * test: add allowCreationDateFilter * fix(step10): separate executions (#5754) * feat: allow skip of success page for native apps (#5627) add possibility to return to callback directly after login without rendering the successful login page * build next * fix(console): disallow inline fonts, critical styles (#5714) fix: disallow inline * fix(setup): step 10 for postgres (#5717) * fix(setup): smaller transactions (#5743) * fix(step10): split statements * fix(step10): split into separate execs * chore: prerelease * add truncate before insert * fix: add truncate * Merge branch 'main' into optimise-step-10 * chore: reset release definition --------- Co-authored-by: Livio Spring <[email protected]> Co-authored-by: Max Peintner <[email protected]> --------- Co-authored-by: Livio Spring <[email protected]> Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
Max Peintner
parent
458a383de2
commit
39bdef35e7
@@ -99,10 +99,11 @@ const (
|
||||
|
||||
type CRDB struct {
|
||||
*database.DB
|
||||
AllowOrderByCreationDate bool
|
||||
}
|
||||
|
||||
func NewCRDB(client *database.DB) *CRDB {
|
||||
return &CRDB{client}
|
||||
func NewCRDB(client *database.DB, allowOrderByCreationDate bool) *CRDB {
|
||||
return &CRDB{client, allowOrderByCreationDate}
|
||||
}
|
||||
|
||||
func (db *CRDB) Health(ctx context.Context) error { return db.Ping() }
|
||||
@@ -254,11 +255,19 @@ func (db *CRDB) db() *sql.DB {
|
||||
}
|
||||
|
||||
func (db *CRDB) orderByEventSequence(desc bool) string {
|
||||
if desc {
|
||||
return " ORDER BY creation_date DESC, event_sequence DESC"
|
||||
if db.AllowOrderByCreationDate {
|
||||
if desc {
|
||||
return " ORDER BY creation_date DESC, event_sequence DESC"
|
||||
}
|
||||
|
||||
return " ORDER BY creation_date, event_sequence"
|
||||
}
|
||||
|
||||
return " ORDER BY creation_date, event_sequence"
|
||||
if desc {
|
||||
return " ORDER BY event_sequence DESC"
|
||||
}
|
||||
|
||||
return " ORDER BY event_sequence"
|
||||
}
|
||||
|
||||
func (db *CRDB) eventQuery() string {
|
||||
|
||||
Reference in New Issue
Block a user