mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-10 16:15:12 +00:00
feat(relational): implement session repository (#11109)
# Which Problems Are Solved As part of going to a relation storage model, we need to implement the repository for handling sessions and their events. # How the Problems Are Solved - Adds a migration step to create the necessary tables and types in the database. - Adds the repository implementation for sessions. - Implements a projection handler for session events to handle the events written by the old command handlers. - Updates the `Session` type and `SessionRepository` interface: - added `CreatorID` - Adjusted `Delete` method to return amount of affected columns - Removed sub-repository clumns from the main interface - Added `CreatorIDCondition`, `ExpirationCondition`, `ExistsFactor` and `ExistsMetadata` - Removed `SetUserAgent` - Methods of `SessionFactor` and `SessionChallenge` have been made public - fixed enumer on `SessionFactorType` - Adds a `JSON` type to the repository package to easy can JSON columns, resp. jsonb object inside a property of a `JSONArray` object. - Adds a `NoChange` interface, which can be implemented to signal that a `Change` interface implementation is not writing any changes to the statement builder, e.g. `CTEChange` # Additional Changes - Fixes the operators enums. `TextOperations` had wrong comments and `NumberOperations` additionally also had from comparisons. - Fixes downgrade of migration step 008. # Additional Context - closes https://github.com/zitadel/zitadel/issues/10212
This commit is contained in:
@@ -28,12 +28,12 @@ func _NumberOperationNoOp() {
|
||||
_ = x[NumberOperationEqual-(1)]
|
||||
_ = x[NumberOperationNotEqual-(2)]
|
||||
_ = x[NumberOperationLessThan-(3)]
|
||||
_ = x[NumberOperationAtLeast-(4)]
|
||||
_ = x[NumberOperationLessThanOrEqual-(4)]
|
||||
_ = x[NumberOperationGreaterThan-(5)]
|
||||
_ = x[NumberOperationAtMost-(6)]
|
||||
_ = x[NumberOperationGreaterThanOrEqual-(6)]
|
||||
}
|
||||
|
||||
var _NumberOperationValues = []NumberOperation{NumberOperationEqual, NumberOperationNotEqual, NumberOperationLessThan, NumberOperationAtLeast, NumberOperationGreaterThan, NumberOperationAtMost}
|
||||
var _NumberOperationValues = []NumberOperation{NumberOperationEqual, NumberOperationNotEqual, NumberOperationLessThan, NumberOperationLessThanOrEqual, NumberOperationGreaterThan, NumberOperationGreaterThanOrEqual}
|
||||
|
||||
var _NumberOperationNameToValueMap = map[string]NumberOperation{
|
||||
_NumberOperationName[0:1]: NumberOperationEqual,
|
||||
@@ -42,12 +42,12 @@ var _NumberOperationNameToValueMap = map[string]NumberOperation{
|
||||
_NumberOperationLowerName[1:3]: NumberOperationNotEqual,
|
||||
_NumberOperationName[3:4]: NumberOperationLessThan,
|
||||
_NumberOperationLowerName[3:4]: NumberOperationLessThan,
|
||||
_NumberOperationName[4:6]: NumberOperationAtLeast,
|
||||
_NumberOperationLowerName[4:6]: NumberOperationAtLeast,
|
||||
_NumberOperationName[4:6]: NumberOperationLessThanOrEqual,
|
||||
_NumberOperationLowerName[4:6]: NumberOperationLessThanOrEqual,
|
||||
_NumberOperationName[6:7]: NumberOperationGreaterThan,
|
||||
_NumberOperationLowerName[6:7]: NumberOperationGreaterThan,
|
||||
_NumberOperationName[7:9]: NumberOperationAtMost,
|
||||
_NumberOperationLowerName[7:9]: NumberOperationAtMost,
|
||||
_NumberOperationName[7:9]: NumberOperationGreaterThanOrEqual,
|
||||
_NumberOperationLowerName[7:9]: NumberOperationGreaterThanOrEqual,
|
||||
}
|
||||
|
||||
var _NumberOperationNames = []string{
|
||||
|
||||
Reference in New Issue
Block a user