@contember/engine-content-api 2.0.0-alpha.35 → 2.0.0-alpha.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +31 -6
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +31 -6
- package/dist/development/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
- package/dist/development/src/input-validation/ColumnValueResolver.cjs.map +1 -1
- package/dist/development/src/input-validation/ColumnValueResolver.js.map +1 -1
- package/dist/development/src/input-validation/preValidation/CreateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/development/src/input-validation/preValidation/CreateInputPreValidationProcessor.js.map +1 -1
- package/dist/development/src/input-validation/preValidation/InputPreValidator.cjs.map +1 -1
- package/dist/development/src/input-validation/preValidation/InputPreValidator.js.map +1 -1
- package/dist/development/src/input-validation/preValidation/UpdateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/development/src/input-validation/preValidation/UpdateInputPreValidationProcessor.js.map +1 -1
- package/dist/development/src/inputProcessing/CreateInputVisitor.cjs +6 -7
- package/dist/development/src/inputProcessing/CreateInputVisitor.cjs.map +1 -1
- package/dist/development/src/inputProcessing/CreateInputVisitor.js +6 -7
- package/dist/development/src/inputProcessing/CreateInputVisitor.js.map +1 -1
- package/dist/development/src/inputProcessing/UpdateInputVisitor.cjs +14 -15
- package/dist/development/src/inputProcessing/UpdateInputVisitor.cjs.map +1 -1
- package/dist/development/src/inputProcessing/UpdateInputVisitor.js +14 -15
- package/dist/development/src/inputProcessing/UpdateInputVisitor.js.map +1 -1
- package/dist/development/src/mapper/ColumnValue.cjs +8 -18
- package/dist/development/src/mapper/ColumnValue.cjs.map +1 -1
- package/dist/development/src/mapper/ColumnValue.js +8 -18
- package/dist/development/src/mapper/ColumnValue.js.map +1 -1
- package/dist/development/src/mapper/EventManager.cjs +1 -1
- package/dist/development/src/mapper/EventManager.cjs.map +1 -1
- package/dist/development/src/mapper/EventManager.js +1 -1
- package/dist/development/src/mapper/EventManager.js.map +1 -1
- package/dist/development/src/mapper/Mapper.cjs +8 -28
- package/dist/development/src/mapper/Mapper.cjs.map +1 -1
- package/dist/development/src/mapper/Mapper.js +8 -28
- package/dist/development/src/mapper/Mapper.js.map +1 -1
- package/dist/development/src/mapper/Result.cjs.map +1 -1
- package/dist/development/src/mapper/Result.js.map +1 -1
- package/dist/development/src/mapper/delete/DeleteExecutor.cjs +4 -8
- package/dist/development/src/mapper/delete/DeleteExecutor.cjs.map +1 -1
- package/dist/development/src/mapper/delete/DeleteExecutor.js +5 -9
- package/dist/development/src/mapper/delete/DeleteExecutor.js.map +1 -1
- package/dist/development/src/mapper/insert/InsertBuilder.cjs +12 -8
- package/dist/development/src/mapper/insert/InsertBuilder.cjs.map +1 -1
- package/dist/development/src/mapper/insert/InsertBuilder.js +13 -9
- package/dist/development/src/mapper/insert/InsertBuilder.js.map +1 -1
- package/dist/development/src/mapper/insert/Inserter.cjs.map +1 -1
- package/dist/development/src/mapper/insert/Inserter.js.map +1 -1
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.cjs +1 -3
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.js +1 -3
- package/dist/development/src/mapper/insert/SqlCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs +3 -5
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js +4 -6
- package/dist/development/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs +3 -5
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js +4 -6
- package/dist/development/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs +4 -3
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js +4 -3
- package/dist/development/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs +3 -5
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js +4 -6
- package/dist/development/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs +4 -6
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js +5 -7
- package/dist/development/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/SqlUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/SqlUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/UpdateBuilder.cjs +12 -5
- package/dist/development/src/mapper/update/UpdateBuilder.cjs.map +1 -1
- package/dist/development/src/mapper/update/UpdateBuilder.js +13 -6
- package/dist/development/src/mapper/update/UpdateBuilder.js.map +1 -1
- package/dist/development/src/mapper/update/Updater.cjs.map +1 -1
- package/dist/development/src/mapper/update/Updater.js.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs +11 -16
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js +12 -17
- package/dist/development/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs +6 -7
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js +7 -8
- package/dist/development/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs +5 -4
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js +5 -4
- package/dist/development/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs +11 -12
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js +12 -13
- package/dist/development/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs +8 -12
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs.map +1 -1
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js +9 -13
- package/dist/development/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs +31 -6
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.cjs.map +1 -1
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js +31 -6
- package/dist/production/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.js.map +1 -1
- package/dist/production/src/input-validation/ColumnValueResolver.cjs.map +1 -1
- package/dist/production/src/input-validation/ColumnValueResolver.js.map +1 -1
- package/dist/production/src/input-validation/preValidation/CreateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/production/src/input-validation/preValidation/CreateInputPreValidationProcessor.js.map +1 -1
- package/dist/production/src/input-validation/preValidation/InputPreValidator.cjs.map +1 -1
- package/dist/production/src/input-validation/preValidation/InputPreValidator.js.map +1 -1
- package/dist/production/src/input-validation/preValidation/UpdateInputPreValidationProcessor.cjs.map +1 -1
- package/dist/production/src/input-validation/preValidation/UpdateInputPreValidationProcessor.js.map +1 -1
- package/dist/production/src/inputProcessing/CreateInputVisitor.cjs +6 -7
- package/dist/production/src/inputProcessing/CreateInputVisitor.cjs.map +1 -1
- package/dist/production/src/inputProcessing/CreateInputVisitor.js +6 -7
- package/dist/production/src/inputProcessing/CreateInputVisitor.js.map +1 -1
- package/dist/production/src/inputProcessing/UpdateInputVisitor.cjs +14 -15
- package/dist/production/src/inputProcessing/UpdateInputVisitor.cjs.map +1 -1
- package/dist/production/src/inputProcessing/UpdateInputVisitor.js +14 -15
- package/dist/production/src/inputProcessing/UpdateInputVisitor.js.map +1 -1
- package/dist/production/src/mapper/ColumnValue.cjs +8 -18
- package/dist/production/src/mapper/ColumnValue.cjs.map +1 -1
- package/dist/production/src/mapper/ColumnValue.js +8 -18
- package/dist/production/src/mapper/ColumnValue.js.map +1 -1
- package/dist/production/src/mapper/EventManager.cjs +1 -1
- package/dist/production/src/mapper/EventManager.cjs.map +1 -1
- package/dist/production/src/mapper/EventManager.js +1 -1
- package/dist/production/src/mapper/EventManager.js.map +1 -1
- package/dist/production/src/mapper/Mapper.cjs +8 -28
- package/dist/production/src/mapper/Mapper.cjs.map +1 -1
- package/dist/production/src/mapper/Mapper.js +8 -28
- package/dist/production/src/mapper/Mapper.js.map +1 -1
- package/dist/production/src/mapper/Result.cjs.map +1 -1
- package/dist/production/src/mapper/Result.js.map +1 -1
- package/dist/production/src/mapper/delete/DeleteExecutor.cjs +4 -8
- package/dist/production/src/mapper/delete/DeleteExecutor.cjs.map +1 -1
- package/dist/production/src/mapper/delete/DeleteExecutor.js +5 -9
- package/dist/production/src/mapper/delete/DeleteExecutor.js.map +1 -1
- package/dist/production/src/mapper/insert/InsertBuilder.cjs +12 -8
- package/dist/production/src/mapper/insert/InsertBuilder.cjs.map +1 -1
- package/dist/production/src/mapper/insert/InsertBuilder.js +13 -9
- package/dist/production/src/mapper/insert/InsertBuilder.js.map +1 -1
- package/dist/production/src/mapper/insert/Inserter.cjs.map +1 -1
- package/dist/production/src/mapper/insert/Inserter.js.map +1 -1
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.cjs +1 -3
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.js +1 -3
- package/dist/production/src/mapper/insert/SqlCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs +3 -5
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js +4 -6
- package/dist/production/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs +3 -5
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js +4 -6
- package/dist/production/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs +4 -3
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js +4 -3
- package/dist/production/src/mapper/insert/relations/OneHasManyCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs +3 -5
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js +4 -6
- package/dist/production/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs +4 -6
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js +5 -7
- package/dist/production/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/SqlUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/SqlUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/UpdateBuilder.cjs +12 -5
- package/dist/production/src/mapper/update/UpdateBuilder.cjs.map +1 -1
- package/dist/production/src/mapper/update/UpdateBuilder.js +13 -6
- package/dist/production/src/mapper/update/UpdateBuilder.js.map +1 -1
- package/dist/production/src/mapper/update/Updater.cjs.map +1 -1
- package/dist/production/src/mapper/update/Updater.js.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs +11 -16
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js +12 -17
- package/dist/production/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs +6 -7
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js +7 -8
- package/dist/production/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs +5 -4
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js +5 -4
- package/dist/production/src/mapper/update/relations/OneHasManyUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs +11 -12
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js +12 -13
- package/dist/production/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.js.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs +8 -12
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.cjs.map +1 -1
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js +9 -13
- package/dist/production/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.js.map +1 -1
- package/dist/tests/cases/integration/graphQlRequests/insert/jsonInsert.test.d.ts +2 -0
- package/dist/tests/cases/integration/graphQlRequests/insert/jsonInsert.test.d.ts.map +1 -0
- package/dist/tests/tsconfig.tsbuildinfo +1 -1
- package/dist/types/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.d.ts.map +1 -1
- package/dist/types/input-validation/ColumnValueResolver.d.ts +1 -1
- package/dist/types/input-validation/ColumnValueResolver.d.ts.map +1 -1
- package/dist/types/input-validation/ValidationDataSelector.d.ts +1 -1
- package/dist/types/input-validation/preValidation/CreateInputPreValidationProcessor.d.ts +3 -3
- package/dist/types/input-validation/preValidation/CreateInputPreValidationProcessor.d.ts.map +1 -1
- package/dist/types/input-validation/preValidation/InputPreValidator.d.ts +3 -3
- package/dist/types/input-validation/preValidation/InputPreValidator.d.ts.map +1 -1
- package/dist/types/input-validation/preValidation/UpdateInputPreValidationProcessor.d.ts +4 -4
- package/dist/types/input-validation/preValidation/UpdateInputPreValidationProcessor.d.ts.map +1 -1
- package/dist/types/inputProcessing/CreateInputProcessor.d.ts +8 -6
- package/dist/types/inputProcessing/CreateInputProcessor.d.ts.map +1 -1
- package/dist/types/inputProcessing/CreateInputVisitor.d.ts +3 -2
- package/dist/types/inputProcessing/CreateInputVisitor.d.ts.map +1 -1
- package/dist/types/inputProcessing/UpdateInputProcessor.d.ts +14 -12
- package/dist/types/inputProcessing/UpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/inputProcessing/UpdateInputVisitor.d.ts +3 -2
- package/dist/types/inputProcessing/UpdateInputVisitor.d.ts.map +1 -1
- package/dist/types/mapper/ColumnValue.d.ts +4 -8
- package/dist/types/mapper/ColumnValue.d.ts.map +1 -1
- package/dist/types/mapper/EventManager.d.ts +9 -9
- package/dist/types/mapper/EventManager.d.ts.map +1 -1
- package/dist/types/mapper/Mapper.d.ts +6 -7
- package/dist/types/mapper/Mapper.d.ts.map +1 -1
- package/dist/types/mapper/Result.d.ts +5 -4
- package/dist/types/mapper/Result.d.ts.map +1 -1
- package/dist/types/mapper/delete/DeleteExecutor.d.ts.map +1 -1
- package/dist/types/mapper/insert/InsertBuilder.d.ts +3 -4
- package/dist/types/mapper/insert/InsertBuilder.d.ts.map +1 -1
- package/dist/types/mapper/insert/Inserter.d.ts +3 -2
- package/dist/types/mapper/insert/Inserter.d.ts.map +1 -1
- package/dist/types/mapper/insert/SqlCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/ManyHasManyCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/ManyHasManyCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/ManyHasOneCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/ManyHasOneCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/OneHasManyCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/OneHasManyCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/types.d.ts +84 -1
- package/dist/types/mapper/types.d.ts.map +1 -1
- package/dist/types/mapper/update/SqlUpdateInputProcessor.d.ts +2 -1
- package/dist/types/mapper/update/SqlUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/UpdateBuilder.d.ts +3 -3
- package/dist/types/mapper/update/UpdateBuilder.d.ts.map +1 -1
- package/dist/types/mapper/update/Updater.d.ts +2 -1
- package/dist/types/mapper/update/Updater.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/ManyHasManyUpdateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/update/relations/ManyHasManyUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/ManyHasOneUpdateInputProcessor.d.ts +6 -4
- package/dist/types/mapper/update/relations/ManyHasOneUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/OneHasManyUpdateInputProcessor.d.ts +5 -3
- package/dist/types/mapper/update/relations/OneHasManyUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.d.ts +6 -4
- package/dist/types/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.d.ts +6 -4
- package/dist/types/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/extensions/hasManyToHasOneReducer/HasManyToHasOneRelationReducerVisitor.ts +35 -2
- package/src/input-validation/ColumnValueResolver.ts +1 -1
- package/src/input-validation/preValidation/CreateInputPreValidationProcessor.ts +2 -2
- package/src/input-validation/preValidation/InputPreValidator.ts +7 -7
- package/src/input-validation/preValidation/UpdateInputPreValidationProcessor.ts +3 -3
- package/src/inputProcessing/CreateInputProcessor.ts +8 -6
- package/src/inputProcessing/CreateInputVisitor.ts +18 -19
- package/src/inputProcessing/UpdateInputProcessor.ts +13 -11
- package/src/inputProcessing/UpdateInputVisitor.ts +25 -24
- package/src/mapper/ColumnValue.ts +11 -25
- package/src/mapper/EventManager.ts +6 -6
- package/src/mapper/Mapper.ts +19 -37
- package/src/mapper/Result.ts +3 -2
- package/src/mapper/delete/DeleteExecutor.ts +4 -8
- package/src/mapper/insert/InsertBuilder.ts +20 -17
- package/src/mapper/insert/Inserter.ts +4 -3
- package/src/mapper/insert/SqlCreateInputProcessor.ts +1 -3
- package/src/mapper/insert/relations/ManyHasManyCreateInputProcessor.ts +8 -8
- package/src/mapper/insert/relations/ManyHasOneCreateInputProcessor.ts +8 -8
- package/src/mapper/insert/relations/OneHasManyCreateInputProcessor.ts +8 -6
- package/src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.ts +8 -9
- package/src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.ts +9 -9
- package/src/mapper/types.ts +115 -1
- package/src/mapper/update/SqlUpdateInputProcessor.ts +2 -1
- package/src/mapper/update/UpdateBuilder.ts +20 -12
- package/src/mapper/update/Updater.ts +3 -2
- package/src/mapper/update/relations/ManyHasManyUpdateInputProcessor.ts +15 -19
- package/src/mapper/update/relations/ManyHasOneUpdateInputProcessor.ts +11 -11
- package/src/mapper/update/relations/OneHasManyUpdateInputProcessor.ts +9 -7
- package/src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.ts +18 -18
- package/src/mapper/update/relations/OneHasOneOwningUpdateInputProcessor.ts +14 -17
- package/tests/cases/integration/graphQlRequests/insert/jsonInsert.test.ts +37 -0
- package/tests/cases/integration/graphQlRequests/query/misc/reducedHasMany.test.ts +69 -0
- package/tests/cases/integration/graphQlRequests/update/manyHasOne/update.test.ts +0 -5
- package/tests/cases/integration/graphQlRequests/update/manyHasOne/upsert.test.ts +0 -5
- package/tests/cases/integration/graphQlRequests/update/oneHasOneInverse/upsert.test.ts +9 -0
- package/tests/cases/integration/graphQlRequests/update/oneHasOneOwning/update.test.ts +0 -5
- package/tests/cases/integration/graphQlRequests/update/oneHasOneOwning/upsert.test.ts +0 -5
- package/tests/cases/integration/graphQlSchema/schema-acl-allowed.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-acl-restricted-create.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-acl-restricted-delete.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-acl-restricted-update.gql +5 -0
- package/tests/cases/integration/graphQlSchema/schema-basic.gql +11 -0
- package/tests/cases/integration/graphQlSchema/schema-bug-66.gql +6 -0
- package/tests/cases/integration/graphQlSchema/schema-custom-primary.gql +11 -0
- package/tests/cases/integration/graphQlSchema/schema-has-many-reduction.gql +6 -0
- package/tests/cases/integration/graphQlSchema/schema-new-builder.gql +12 -0
- package/tests/cases/unit/inputPreValidator.test.ts +1 -1
- package/tests/src/testGraphql.ts +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { MutationResultList } from '../Result';
|
|
2
2
|
import { Mapper } from '../Mapper';
|
|
3
|
-
import {
|
|
3
|
+
import { Model } from '@contember/schema';
|
|
4
4
|
import { Providers } from '@contember/schema-utils';
|
|
5
5
|
import { InsertBuilderFactory } from './InsertBuilderFactory';
|
|
6
6
|
import { InsertBuilder } from './InsertBuilder';
|
|
7
7
|
import { DatabaseMetadata } from '@contember/database';
|
|
8
|
+
import { MapperInput } from '../types';
|
|
8
9
|
export declare class Inserter {
|
|
9
10
|
private readonly schema;
|
|
10
11
|
private readonly schemaDatabaseMetadata;
|
|
11
12
|
private readonly insertBuilderFactory;
|
|
12
13
|
private readonly providers;
|
|
13
14
|
constructor(schema: Model.Schema, schemaDatabaseMetadata: DatabaseMetadata, insertBuilderFactory: InsertBuilderFactory, providers: Providers);
|
|
14
|
-
insert(mapper: Mapper, entity: Model.Entity, data:
|
|
15
|
+
insert(mapper: Mapper, entity: Model.Entity, data: MapperInput.CreateDataInput, insertIdCallback: (id: string) => void, builderCb: (builder: InsertBuilder) => void): Promise<MutationResultList>;
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=Inserter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Inserter.d.ts","sourceRoot":"","sources":["../../../../src/mapper/insert/Inserter.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Inserter.d.ts","sourceRoot":"","sources":["../../../../src/mapper/insert/Inserter.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAGvF,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAsB,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC,qBAAa,QAAQ;IAEnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,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,CAAiC;IACvE,OAAO,CAAC,8BAA8B,CAAgC;IACtE,OAAO,CAAC,+BAA+B,CAAiC;gBAGtD,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS;IASzB,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,aAAa,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAA;KAAE,GAAG,OAAO,CAAC,6BAA6B,CAAC;IAQpI,kBAAkB,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,oBAAoB,CAAC,CAI5F;IAED,iBAAiB,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,mBAAmB,CAAC,CAI1F;IAED,UAAU,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAQ5E;IAED,UAAU,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAI5E;IAGD,eAAe,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,iBAAiB,CAAC,CAQtF;IAED,gBAAgB,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,kBAAkB,CAAC,CAIxF;CACD"}
|
|
@@ -2,20 +2,22 @@ import { Input, Model } from '@contember/schema';
|
|
|
2
2
|
import { Mapper } from '../../Mapper';
|
|
3
3
|
import { CreateInputProcessor } from '../../../inputProcessing';
|
|
4
4
|
import { SqlCreateInputProcessorResult } from '../SqlCreateInputProcessor';
|
|
5
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
6
|
+
import { MapperInput } from '../../types';
|
|
5
7
|
type Context = Model.ManyHasManyOwningContext | Model.ManyHasManyInverseContext;
|
|
6
8
|
export declare class ManyHasManyCreateInputProcessor implements CreateInputProcessor.HasManyRelationProcessor<Context, SqlCreateInputProcessorResult> {
|
|
7
9
|
private readonly mapper;
|
|
8
10
|
constructor(mapper: Mapper);
|
|
9
11
|
connect({ entity, targetEntity, relation, targetRelation, input }: Context & {
|
|
10
|
-
input: Input.UniqueWhere;
|
|
12
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
11
13
|
}): Promise<SqlCreateInputProcessorResult>;
|
|
12
14
|
create({ entity, targetEntity, relation, input }: Context & {
|
|
13
|
-
input:
|
|
15
|
+
input: MapperInput.CreateDataInput;
|
|
14
16
|
}): Promise<({ primary }: {
|
|
15
17
|
primary: Input.PrimaryValue;
|
|
16
18
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
17
19
|
connectOrCreate(context: Context & {
|
|
18
|
-
input:
|
|
20
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
19
21
|
}): Promise<({ primary }: {
|
|
20
22
|
primary: Input.PrimaryValue;
|
|
21
23
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManyHasManyCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/ManyHasManyCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"ManyHasManyCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/ManyHasManyCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,KAAK,OAAO,GAAG,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC,yBAAyB,CAAA;AAE/E,qBAAa,+BAAgC,YAAW,oBAAoB,CAAC,wBAAwB,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAG3I,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAInB,OAAO,CACnB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,GAAG,cAAc,CAAA;KAAE,GAChH,OAAO,CAAC,6BAA6B,CAAC;IAQ5B,MAAM,CAClB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,eAAe,CAAA;KAAE,yBAEhE;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAa9C,eAAe,CAC3B,OAAO,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,oBAAoB,CAAA;KAAE,yBAEnC;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;CAY3D"}
|
|
@@ -4,19 +4,21 @@ import { Mapper } from '../../Mapper';
|
|
|
4
4
|
import { CreateInputProcessor } from '../../../inputProcessing';
|
|
5
5
|
import { SqlCreateInputProcessorResult } from '../SqlCreateInputProcessor';
|
|
6
6
|
import { InsertBuilder } from '../InsertBuilder';
|
|
7
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
8
|
+
import { MapperInput } from '../../types';
|
|
7
9
|
type Context = Model.ManyHasOneContext;
|
|
8
10
|
export declare class ManyHasOneCreateInputProcessor implements CreateInputProcessor.HasManyRelationProcessor<Context, SqlCreateInputProcessorResult> {
|
|
9
11
|
private readonly mapper;
|
|
10
12
|
private readonly insertBuilder;
|
|
11
13
|
constructor(mapper: Mapper, insertBuilder: InsertBuilder);
|
|
12
14
|
connect({ targetEntity, relation, input }: Context & {
|
|
13
|
-
input: Input.UniqueWhere;
|
|
15
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
14
16
|
}): Promise<MutationEntryNotFoundError[]>;
|
|
15
17
|
create({ relation, targetEntity, input }: Context & {
|
|
16
|
-
input:
|
|
18
|
+
input: MapperInput.CreateDataInput;
|
|
17
19
|
}): Promise<import("../../Result").MutationResultList>;
|
|
18
20
|
connectOrCreate({ input: { connect, create }, relation, targetEntity }: Context & {
|
|
19
|
-
input:
|
|
21
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
20
22
|
}): Promise<import("../../Result").MutationResultList>;
|
|
21
23
|
}
|
|
22
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManyHasOneCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/ManyHasOneCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAoB,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"ManyHasOneCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/ManyHasOneCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAoB,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,KAAK,OAAO,GAAG,KAAK,CAAC,iBAAiB,CAAA;AAEtC,qBAAa,8BAA+B,YAAW,oBAAoB,CAAC,wBAAwB,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAG1I,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa;IAGjC,OAAO,CACnB,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,GAAG,cAAc,CAAA;KAAE;IAQ9E,MAAM,CAClB,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,eAAe,CAAA;KAAE;IAWvE,eAAe,CAC3B,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,oBAAoB,CAAA;KAAE;CAgB9G"}
|
|
@@ -2,22 +2,24 @@ import { Input, Model } from '@contember/schema';
|
|
|
2
2
|
import { Mapper } from '../../Mapper';
|
|
3
3
|
import { CreateInputProcessor } from '../../../inputProcessing';
|
|
4
4
|
import { SqlCreateInputProcessorResult } from '../SqlCreateInputProcessor';
|
|
5
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
6
|
+
import { MapperInput } from '../../types';
|
|
5
7
|
type Context = Model.OneHasManyContext;
|
|
6
8
|
export declare class OneHasManyCreateInputProcessor implements CreateInputProcessor.HasManyRelationProcessor<Context, SqlCreateInputProcessorResult> {
|
|
7
9
|
private readonly mapper;
|
|
8
10
|
constructor(mapper: Mapper);
|
|
9
11
|
connect({ entity, targetEntity, targetRelation, input }: Context & {
|
|
10
|
-
input: Input.UniqueWhere;
|
|
12
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
11
13
|
}): Promise<({ primary }: {
|
|
12
14
|
primary: Input.PrimaryValue;
|
|
13
15
|
}) => Promise<import("../..").MutationResultList>>;
|
|
14
16
|
create({ entity, targetEntity, targetRelation, input }: Context & {
|
|
15
|
-
input:
|
|
17
|
+
input: MapperInput.CreateDataInput;
|
|
16
18
|
}): Promise<({ primary }: {
|
|
17
19
|
primary: Input.PrimaryValue;
|
|
18
20
|
}) => Promise<import("../..").MutationResultList>>;
|
|
19
21
|
connectOrCreate({ entity, targetRelation, targetEntity, input: { connect, create } }: Context & {
|
|
20
|
-
input:
|
|
22
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
21
23
|
}): Promise<({ primary }: {
|
|
22
24
|
primary: Input.PrimaryValue;
|
|
23
25
|
}) => Promise<import("../..").MutationResultList>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneHasManyCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/OneHasManyCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"OneHasManyCreateInputProcessor.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KAAE;CAY3D"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { Mapper } from '../../Mapper';
|
|
2
2
|
import { MutationResultList } from '../../Result';
|
|
3
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
3
4
|
import { Input, Model } from '@contember/schema';
|
|
4
5
|
import { CreateInputProcessor } from '../../../inputProcessing';
|
|
5
6
|
import { SqlCreateInputProcessorResult } from '../SqlCreateInputProcessor';
|
|
7
|
+
import { MapperInput } from '../../types';
|
|
6
8
|
type Context = Model.OneHasOneInverseContext;
|
|
7
9
|
export declare class OneHasOneInverseCreateInputProcessor implements CreateInputProcessor.HasOneRelationProcessor<Context, SqlCreateInputProcessorResult> {
|
|
8
10
|
private readonly mapper;
|
|
9
11
|
constructor(mapper: Mapper);
|
|
10
12
|
connect(context: Context & {
|
|
11
|
-
input: Input.UniqueWhere;
|
|
13
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
12
14
|
}): Promise<({ primary }: {
|
|
13
15
|
primary: Input.PrimaryValue;
|
|
14
16
|
}) => Promise<import("../../Result").MutationResult[]>>;
|
|
15
17
|
create({ input, targetRelation, targetEntity }: Context & {
|
|
16
|
-
input:
|
|
18
|
+
input: MapperInput.CreateDataInput;
|
|
17
19
|
}): Promise<({ primary }: {
|
|
18
20
|
primary: Input.PrimaryValue;
|
|
19
21
|
}) => Promise<MutationResultList>>;
|
|
20
22
|
connectOrCreate({ input, ...context }: Context & {
|
|
21
|
-
input:
|
|
23
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
22
24
|
}): Promise<({ primary }: {
|
|
23
25
|
primary: Input.PrimaryValue;
|
|
24
26
|
}) => Promise<MutationResultList>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneHasOneInverseCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAgF,kBAAkB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"OneHasOneInverseCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/OneHasOneInverseCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAgF,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAC/H,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,KAAK,OAAO,GAAG,KAAK,CAAC,uBAAuB,CAAA;AAE5C,qBAAa,oCAAqC,YAAW,oBAAoB,CAAC,uBAAuB,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAG/I,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAInB,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,GAAG,cAAc,CAAA;KAAE,yBACzD;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAU9C,MAAM,CAClB,EAAE,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,eAAe,CAAA;KAAE,yBAE9D;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAQ9C,eAAe,CAC3B,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,oBAAoB,CAAA;KAAE,yBAEjD;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;YAU7C,eAAe;YA4Bf,cAAc;CAS5B"}
|
|
@@ -4,19 +4,21 @@ import { Mapper } from '../../Mapper';
|
|
|
4
4
|
import { Input, Model } from '@contember/schema';
|
|
5
5
|
import { CreateInputProcessor } from '../../../inputProcessing';
|
|
6
6
|
import { SqlCreateInputProcessorResult } from '../SqlCreateInputProcessor';
|
|
7
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
8
|
+
import { MapperInput } from '../../types';
|
|
7
9
|
type Context = Model.OneHasOneOwningContext;
|
|
8
10
|
export declare class OneHasOneOwningCreateInputProcessor implements CreateInputProcessor.HasOneRelationProcessor<Context, SqlCreateInputProcessorResult> {
|
|
9
11
|
private readonly mapper;
|
|
10
12
|
private readonly insertBuilder;
|
|
11
13
|
constructor(mapper: Mapper, insertBuilder: InsertBuilder);
|
|
12
14
|
connect(context: Context & {
|
|
13
|
-
input: Input.UniqueWhere;
|
|
15
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
14
16
|
}): Promise<MutationResultList>;
|
|
15
17
|
create(context: Context & {
|
|
16
|
-
input:
|
|
18
|
+
input: MapperInput.CreateDataInput;
|
|
17
19
|
}): Promise<MutationResultList>;
|
|
18
20
|
connectOrCreate({ input, ...context }: Context & {
|
|
19
|
-
input:
|
|
21
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
20
22
|
}): Promise<MutationResultList>;
|
|
21
23
|
private disconnectCurrentOwner;
|
|
22
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneHasOneOwningCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,kBAAkB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"OneHasOneOwningCreateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/insert/relations/OneHasOneOwningCreateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAKN,kBAAkB,EAClB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,KAAK,OAAO,GAAG,KAAK,CAAC,sBAAsB,CAAA;AAE3C,qBAAa,mCAAoC,YAAW,oBAAoB,CAAC,uBAAuB,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAE9I,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBADb,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa;IAIjC,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,GAAG,cAAc,CAAA;KAAE;IAYxE,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,eAAe,CAAA;KAAE;IAUhE,eAAe,CAAC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,oBAAoB,CAAA;KAAE;YAoB3F,sBAAsB;CAoBpC"}
|
|
@@ -1,6 +1,89 @@
|
|
|
1
|
-
import { Model } from '@contember/schema';
|
|
1
|
+
import { Model, Input, Value } from '@contember/schema';
|
|
2
|
+
import { CheckedPrimary } from './CheckedPrimary';
|
|
2
3
|
export type JoiningColumns = {
|
|
3
4
|
sourceColumn: Model.JoiningColumn;
|
|
4
5
|
targetColumn: Model.JoiningColumn;
|
|
5
6
|
};
|
|
7
|
+
export declare namespace MapperInput {
|
|
8
|
+
interface ConnectRelationInput {
|
|
9
|
+
connect: Input.UniqueWhere | CheckedPrimary;
|
|
10
|
+
}
|
|
11
|
+
interface CreateRelationInput {
|
|
12
|
+
create: CreateDataInput;
|
|
13
|
+
}
|
|
14
|
+
interface ConnectOrCreateInput {
|
|
15
|
+
connect: Input.UniqueWhere | CheckedPrimary;
|
|
16
|
+
create: CreateDataInput;
|
|
17
|
+
}
|
|
18
|
+
interface ConnectOrCreateRelationInput {
|
|
19
|
+
connectOrCreate: ConnectOrCreateInput;
|
|
20
|
+
}
|
|
21
|
+
interface DisconnectSpecifiedRelationInput {
|
|
22
|
+
disconnect: Input.UniqueWhere;
|
|
23
|
+
}
|
|
24
|
+
interface DeleteSpecifiedRelationInput {
|
|
25
|
+
delete: Input.UniqueWhere;
|
|
26
|
+
}
|
|
27
|
+
interface UpdateSpecifiedRelationInput {
|
|
28
|
+
update: {
|
|
29
|
+
by: Input.UniqueWhere;
|
|
30
|
+
data: UpdateDataInput;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface UpsertSpecifiedRelationInput {
|
|
34
|
+
upsert: {
|
|
35
|
+
by: Input.UniqueWhere;
|
|
36
|
+
update: UpdateDataInput;
|
|
37
|
+
create: CreateDataInput;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface DisconnectRelationInput {
|
|
41
|
+
disconnect: true;
|
|
42
|
+
}
|
|
43
|
+
interface UpdateRelationInput {
|
|
44
|
+
update: UpdateDataInput;
|
|
45
|
+
}
|
|
46
|
+
interface DeleteRelationInput {
|
|
47
|
+
delete: true;
|
|
48
|
+
}
|
|
49
|
+
interface UpsertRelationInput {
|
|
50
|
+
upsert: {
|
|
51
|
+
update: UpdateDataInput;
|
|
52
|
+
create: CreateDataInput;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
interface CreateDataInput {
|
|
56
|
+
[column: string]: Value.FieldValue | CreateOneRelationInput | CreateManyRelationInput;
|
|
57
|
+
}
|
|
58
|
+
type CreateOneRelationInput = {
|
|
59
|
+
alias?: string;
|
|
60
|
+
} & (ConnectRelationInput | CreateRelationInput | ConnectOrCreateRelationInput);
|
|
61
|
+
type CreateManyRelationInput = Array<CreateOneRelationInput>;
|
|
62
|
+
interface UpdateDataInput {
|
|
63
|
+
[column: string]: Value.FieldValue | UpdateOneRelationInput | UpdateManyRelationInput;
|
|
64
|
+
}
|
|
65
|
+
interface UpdateInput {
|
|
66
|
+
by: Input.UniqueWhere;
|
|
67
|
+
filter?: Input.OptionalWhere;
|
|
68
|
+
data: UpdateDataInput;
|
|
69
|
+
}
|
|
70
|
+
interface UpsertInput {
|
|
71
|
+
by: Input.UniqueWhere;
|
|
72
|
+
filter?: Input.OptionalWhere;
|
|
73
|
+
update: UpdateDataInput;
|
|
74
|
+
create: CreateDataInput;
|
|
75
|
+
}
|
|
76
|
+
interface CreateInput {
|
|
77
|
+
data: CreateDataInput;
|
|
78
|
+
}
|
|
79
|
+
interface DeleteInput {
|
|
80
|
+
by: Input.UniqueWhere;
|
|
81
|
+
filter?: Input.OptionalWhere;
|
|
82
|
+
}
|
|
83
|
+
type UpdateOneRelationInput = CreateRelationInput | ConnectRelationInput | ConnectOrCreateRelationInput | DeleteRelationInput | DisconnectRelationInput | UpdateRelationInput | UpsertRelationInput;
|
|
84
|
+
type UpdateManyRelationInputItem = {
|
|
85
|
+
alias?: string;
|
|
86
|
+
} & (CreateRelationInput | ConnectRelationInput | ConnectOrCreateRelationInput | DeleteSpecifiedRelationInput | DisconnectSpecifiedRelationInput | UpdateSpecifiedRelationInput | UpsertSpecifiedRelationInput);
|
|
87
|
+
type UpdateManyRelationInput = Array<UpdateManyRelationInputItem>;
|
|
88
|
+
}
|
|
6
89
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mapper/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mapper/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,MAAM,MAAM,cAAc,GAAG;IAAE,YAAY,EAAE,KAAK,CAAC,aAAa,CAAC;IAAC,YAAY,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,CAAA;AAErG,yBAAiB,WAAW,CAAC;IAE5B,UAAiB,oBAAoB;QACpC,OAAO,EAAE,KAAK,CAAC,WAAW,GAAG,cAAc,CAAA;KAC3C;IAED,UAAiB,mBAAmB;QACnC,MAAM,EAAE,eAAe,CAAA;KACvB;IAED,UAAiB,oBAAoB;QACpC,OAAO,EAAE,KAAK,CAAC,WAAW,GAAG,cAAc,CAAA;QAC3C,MAAM,EAAE,eAAe,CAAA;KACvB;IAED,UAAiB,4BAA4B;QAC5C,eAAe,EAAE,oBAAoB,CAAA;KACrC;IAED,UAAiB,gCAAgC;QAChD,UAAU,EAAE,KAAK,CAAC,WAAW,CAAA;KAC7B;IAED,UAAiB,4BAA4B;QAC5C,MAAM,EAAE,KAAK,CAAC,WAAW,CAAA;KACzB;IAED,UAAiB,4BAA4B;QAC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5B,MAAM,EAAE,eAAe,CAAA;QACvB,MAAM,EAAE,eAAe,CAAA;KACvB;IAED,UAAiB,WAAW;QAC3B,IAAI,EAAE,eAAe,CAAA;KACrB;IAED,UAAiB,WAAW;QAC3B,EAAE,EAAE,KAAK,CAAC,WAAW,CAAA;QACrB,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;KAC5B;IAGD,KAAY,sBAAsB,GAC/B,mBAAmB,GACnB,oBAAoB,GACpB,4BAA4B,GAC5B,mBAAmB,GACnB,uBAAuB,GACvB,mBAAmB,GACnB,mBAAmB,CAAA;IAEtB,KAAY,2BAA2B,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,CAC5D,mBAAmB,GACnB,oBAAoB,GACpB,4BAA4B,GAC5B,4BAA4B,GAC5B,gCAAgC,GAChC,4BAA4B,GAC5B,4BAA4B,CAC9B,CAAA;IAED,KAAY,uBAAuB,GAAG,KAAK,CAAC,2BAA2B,CAAC,CAAA;CAExE"}
|
|
@@ -3,6 +3,7 @@ import { Mapper } from '../Mapper';
|
|
|
3
3
|
import { UpdateBuilder } from './UpdateBuilder';
|
|
4
4
|
import { UpdateInputProcessor } from '../../inputProcessing';
|
|
5
5
|
import { MutationResultList } from '../Result';
|
|
6
|
+
import { MapperInput } from '../types';
|
|
6
7
|
export type SqlUpdateInputProcessorResult = MutationResultList | ((ctx: {
|
|
7
8
|
primary: Input.PrimaryValue;
|
|
8
9
|
}) => Promise<MutationResultList>);
|
|
@@ -16,7 +17,7 @@ export declare class SqlUpdateInputProcessor implements UpdateInputProcessor<Sql
|
|
|
16
17
|
private oneHasManyUpdateInputProcessor;
|
|
17
18
|
private manyHasOneUpdateInputProcessor;
|
|
18
19
|
private manyHasManyUpdateInputProcessor;
|
|
19
|
-
constructor(primaryValue: Input.PrimaryValue, data:
|
|
20
|
+
constructor(primaryValue: Input.PrimaryValue, data: MapperInput.UpdateDataInput, updateBuilder: UpdateBuilder, mapper: Mapper);
|
|
20
21
|
column({ entity, column }: Model.ColumnContext): Promise<never[]>;
|
|
21
22
|
manyHasManyInverse: UpdateInputProcessor<SqlUpdateInputProcessorResult>['manyHasManyInverse'];
|
|
22
23
|
manyHasManyOwning: UpdateInputProcessor<SqlUpdateInputProcessorResult>['manyHasManyOwning'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqlUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../src/mapper/update/SqlUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAM/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"SqlUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../src/mapper/update/SqlUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAM/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC,MAAM,MAAM,6BAA6B,GAAG,kBAAkB,GAAG,CAAC,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;CAAC,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAA;AAEvI,qBAAa,uBAAwB,YAAW,oBAAoB,CAAC,6BAA6B,CAAC;IAQjG,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAVxB,OAAO,CAAC,oCAAoC,CAAsC;IAClF,OAAO,CAAC,mCAAmC,CAAqC;IAChF,OAAO,CAAC,8BAA8B,CAAgC;IACtE,OAAO,CAAC,8BAA8B,CAAgC;IACtE,OAAO,CAAC,+BAA+B,CAAiC;gBAGtD,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,IAAI,EAAE,WAAW,CAAC,eAAe,EACjC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM;IASzB,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,aAAa;IAOrD,kBAAkB,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,oBAAoB,CAAC,CAQ5F;IAED,iBAAiB,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,mBAAmB,CAAC,CAQ1F;IAED,UAAU,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAQ5E;IAED,UAAU,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAQ5E;IAED,gBAAgB,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,kBAAkB,CAAC,CAQxF;IAED,eAAe,EAAE,oBAAoB,CAAC,6BAA6B,CAAC,CAAC,iBAAiB,CAAC,CAQtF;CACD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Input, Model, Value } from '@contember/schema';
|
|
2
2
|
import { PathFactory, WhereBuilder } from '../select';
|
|
3
|
-
import {
|
|
3
|
+
import { ColumnValue } from '../ColumnValue';
|
|
4
4
|
import { PredicateFactory } from '../../acl';
|
|
5
5
|
import { Mapper } from '../Mapper';
|
|
6
6
|
export interface UpdateResult {
|
|
7
|
-
values:
|
|
7
|
+
values: ColumnValue[];
|
|
8
8
|
executed: boolean;
|
|
9
9
|
affectedRows: number | null;
|
|
10
10
|
}
|
|
@@ -19,7 +19,7 @@ export declare class UpdateBuilder {
|
|
|
19
19
|
private newWhere;
|
|
20
20
|
private oldWhere;
|
|
21
21
|
constructor(schema: Model.Schema, entity: Model.Entity, whereBuilder: WhereBuilder, primary: Input.PrimaryValue, pathFactory: PathFactory, predicateFactory: PredicateFactory);
|
|
22
|
-
addFieldValue(fieldName: string, value: Value.
|
|
22
|
+
addFieldValue(fieldName: string, value: Value.FieldValue | undefined): void;
|
|
23
23
|
addNewWhere(where: Input.OptionalWhere): void;
|
|
24
24
|
addOldWhere(where: Input.OptionalWhere): void;
|
|
25
25
|
addPredicates(fields: string[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateBuilder.d.ts","sourceRoot":"","sources":["../../../../src/mapper/update/UpdateBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAG5D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"UpdateBuilder.d.ts","sourceRoot":"","sources":["../../../../src/mapper/update/UpdateBuilder.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAG5D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,qBAAa,aAAa;IAOxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IAXlC,OAAO,CAAC,OAAO,CAAsC;IAErD,OAAO,CAAC,QAAQ,CAA8C;IAC9D,OAAO,CAAC,QAAQ,CAA8C;gBAG5C,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,KAAK,CAAC,YAAY,EAC3B,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB;IAG7C,aAAa,CACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,SAAS,GACjC,IAAI;IAUA,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,GAAG,IAAI;IAI7C,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,GAAG,IAAI;IAI7C,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAM/B,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;CA0F3D"}
|
|
@@ -5,13 +5,14 @@ import { Mapper } from '../Mapper';
|
|
|
5
5
|
import { MutationResultList } from '../Result';
|
|
6
6
|
import { UpdateBuilder } from './UpdateBuilder';
|
|
7
7
|
import { DatabaseMetadata } from '@contember/database';
|
|
8
|
+
import { MapperInput } from '../types';
|
|
8
9
|
export declare class Updater {
|
|
9
10
|
private readonly schema;
|
|
10
11
|
private readonly schemaDatabaseMetadata;
|
|
11
12
|
private readonly predicateFactory;
|
|
12
13
|
private readonly updateBuilderFactory;
|
|
13
14
|
constructor(schema: Model.Schema, schemaDatabaseMetadata: DatabaseMetadata, predicateFactory: PredicateFactory, updateBuilderFactory: UpdateBuilderFactory);
|
|
14
|
-
update(mapper: Mapper, entity: Model.Entity, primaryValue: Input.PrimaryValue, data:
|
|
15
|
+
update(mapper: Mapper, entity: Model.Entity, primaryValue: Input.PrimaryValue, data: MapperInput.UpdateDataInput, filter?: Input.OptionalWhere): Promise<MutationResultList>;
|
|
15
16
|
updateCb(mapper: Mapper, entity: Model.Entity, primaryValue: Input.PrimaryValue, builderCb: (builder: UpdateBuilder) => void): Promise<MutationResultList>;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=Updater.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Updater.d.ts","sourceRoot":"","sources":["../../../../src/mapper/update/Updater.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAA8C,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Updater.d.ts","sourceRoot":"","sources":["../../../../src/mapper/update/Updater.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAA8C,kBAAkB,EAAuC,MAAM,WAAW,CAAA;AAC/H,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAEtC,qBAAa,OAAO;IAElB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;gBAHpB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,sBAAsB,EAAE,gBAAgB,EACxC,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,oBAAoB;IAG/C,MAAM,CAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,IAAI,EAAE,WAAW,CAAC,eAAe,EACjC,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IA8DjB,QAAQ,CACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,SAAS,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,GACzC,OAAO,CAAC,kBAAkB,CAAC;CAe9B"}
|
|
@@ -2,22 +2,24 @@ import { UpdateInputProcessor } from '../../../inputProcessing';
|
|
|
2
2
|
import { Input, Model } from '@contember/schema';
|
|
3
3
|
import { Mapper } from '../../Mapper';
|
|
4
4
|
import { SqlUpdateInputProcessorResult } from '../../update';
|
|
5
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
6
|
+
import { MapperInput } from '../../types';
|
|
5
7
|
type Context = Model.ManyHasManyOwningContext | Model.ManyHasManyInverseContext;
|
|
6
8
|
export declare class ManyHasManyUpdateInputProcessor implements UpdateInputProcessor.HasManyRelationInputProcessor<Context, SqlUpdateInputProcessorResult> {
|
|
7
9
|
private readonly mapper;
|
|
8
10
|
constructor(mapper: Mapper);
|
|
9
11
|
connect({ entity, targetEntity, relation, targetRelation, input }: Context & {
|
|
10
|
-
input: Input.UniqueWhere;
|
|
12
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
11
13
|
}): Promise<({ primary }: {
|
|
12
14
|
primary: Input.PrimaryValue;
|
|
13
15
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
14
16
|
create({ entity, targetEntity, relation, input }: Context & {
|
|
15
|
-
input:
|
|
17
|
+
input: MapperInput.CreateDataInput;
|
|
16
18
|
}): Promise<({ primary }: {
|
|
17
19
|
primary: Input.PrimaryValue;
|
|
18
20
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
19
21
|
connectOrCreate(context: Context & {
|
|
20
|
-
input:
|
|
22
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
21
23
|
}): Promise<({ primary }: {
|
|
22
24
|
primary: Input.PrimaryValue;
|
|
23
25
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManyHasManyUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/ManyHasManyUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"ManyHasManyUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/ManyHasManyUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA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;IAU9C,MAAM,CAClB,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAA;KAAE,yBAEpG;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAmB9C,UAAU,CACtB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAA;KAAE,yBAEtD;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAQ9C,MAAM,CAClB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAA;KAAE,yBAEtE;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;CAI3D"}
|
|
@@ -4,6 +4,8 @@ import { MutationConstraintViolationError, MutationEntryNotFoundError } from '..
|
|
|
4
4
|
import { Mapper } from '../../Mapper';
|
|
5
5
|
import { SqlUpdateInputProcessorResult } from '../SqlUpdateInputProcessor';
|
|
6
6
|
import { UpdateBuilder } from '../UpdateBuilder';
|
|
7
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
8
|
+
import { MapperInput } from '../../types';
|
|
7
9
|
type Context = Model.ManyHasOneContext;
|
|
8
10
|
export declare class ManyHasOneUpdateInputProcessor implements UpdateInputProcessor.HasOneRelationInputProcessor<Context, SqlUpdateInputProcessorResult> {
|
|
9
11
|
private readonly mapper;
|
|
@@ -11,16 +13,16 @@ export declare class ManyHasOneUpdateInputProcessor implements UpdateInputProces
|
|
|
11
13
|
private readonly primary;
|
|
12
14
|
constructor(mapper: Mapper, builder: UpdateBuilder, primary: Input.PrimaryValue);
|
|
13
15
|
connect({ targetEntity, relation, input }: Context & {
|
|
14
|
-
input: Input.UniqueWhere;
|
|
16
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
15
17
|
}): Promise<MutationEntryNotFoundError[]>;
|
|
16
18
|
create({ relation, targetEntity, input }: Context & {
|
|
17
|
-
input:
|
|
19
|
+
input: MapperInput.CreateDataInput;
|
|
18
20
|
}): Promise<import("../../Result").MutationResultList>;
|
|
19
21
|
connectOrCreate({ input: { connect, create }, relation, targetEntity }: Context & {
|
|
20
|
-
input:
|
|
22
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
21
23
|
}): Promise<import("../../Result").MutationResultList>;
|
|
22
24
|
update({ entity, relation, targetEntity, targetRelation, input }: Context & {
|
|
23
|
-
input:
|
|
25
|
+
input: MapperInput.UpdateDataInput;
|
|
24
26
|
}): Promise<({ primary }: {
|
|
25
27
|
primary: Input.PrimaryValue;
|
|
26
28
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManyHasOneUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/ManyHasOneUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAGN,gCAAgC,EAChC,0BAA0B,EAG1B,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"ManyHasOneUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/ManyHasOneUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EA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AAQ,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,WAAW,CAAC,eAAe,CAAA;KAAE,yBAEhF;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAa9C,MAAM,CAClB,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,oBAAoB,CAAC,WAAW,CAAA;KAAE;IAgBxG,UAAU,CACtB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,SAAS,CAAA;KAAE;IAStE,MAAM,CAClB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,SAAS,CAAA;KAAE,+DAKvD;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;CAS3D"}
|
|
@@ -2,22 +2,24 @@ import { UpdateInputProcessor } from '../../../inputProcessing';
|
|
|
2
2
|
import { Input, Model } from '@contember/schema';
|
|
3
3
|
import { Mapper } from '../../Mapper';
|
|
4
4
|
import { SqlUpdateInputProcessorResult } from '../SqlUpdateInputProcessor';
|
|
5
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
6
|
+
import { MapperInput } from '../../types';
|
|
5
7
|
type Context = Model.OneHasManyContext;
|
|
6
8
|
export declare class OneHasManyUpdateInputProcessor implements UpdateInputProcessor.HasManyRelationInputProcessor<Context, SqlUpdateInputProcessorResult> {
|
|
7
9
|
private readonly mapper;
|
|
8
10
|
constructor(mapper: Mapper);
|
|
9
11
|
connect({ entity, targetEntity, targetRelation, input }: Context & {
|
|
10
|
-
input: Input.UniqueWhere;
|
|
12
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
11
13
|
}): Promise<({ primary }: {
|
|
12
14
|
primary: Input.PrimaryValue;
|
|
13
15
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
14
16
|
create({ entity, targetEntity, targetRelation, input }: Context & {
|
|
15
|
-
input:
|
|
17
|
+
input: MapperInput.CreateDataInput;
|
|
16
18
|
}): Promise<({ primary }: {
|
|
17
19
|
primary: Input.PrimaryValue;
|
|
18
20
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
19
21
|
connectOrCreate({ entity, targetRelation, targetEntity, input: { connect, create } }: Context & {
|
|
20
|
-
input:
|
|
22
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
21
23
|
}): Promise<({ primary }: {
|
|
22
24
|
primary: Input.PrimaryValue;
|
|
23
25
|
}) => Promise<import("../../Result").MutationResultList>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneHasManyUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/OneHasManyUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"OneHasManyUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/OneHasManyUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,s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,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAA;KAAE,yBAE1G;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAmB9C,UAAU,CACtB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAA;KAAE,yBAEtE;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;IAS9C,MAAM,CAClB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,OAAO,GAAG;QAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAA;KAAE,yBAEtE;QAAE,OAAO,EAAE,KAAK,CAAC,YAAY,CAAA;KAAE;CAO3D"}
|
|
@@ -3,22 +3,24 @@ import { UpdateInputProcessor } from '../../../inputProcessing';
|
|
|
3
3
|
import { Input, Model } from '@contember/schema';
|
|
4
4
|
import { Mapper } from '../../Mapper';
|
|
5
5
|
import { SqlUpdateInputProcessorResult } from '../SqlUpdateInputProcessor';
|
|
6
|
+
import { CheckedPrimary } from '../../CheckedPrimary';
|
|
7
|
+
import { MapperInput } from '../../types';
|
|
6
8
|
type Context = Model.OneHasOneInverseContext;
|
|
7
9
|
export declare class OneHasOneInverseUpdateInputProcessor implements UpdateInputProcessor.HasOneRelationInputProcessor<Context, SqlUpdateInputProcessorResult> {
|
|
8
10
|
private readonly primaryValue;
|
|
9
11
|
private readonly mapper;
|
|
10
12
|
constructor(primaryValue: Input.PrimaryValue, mapper: Mapper);
|
|
11
13
|
connect({ input, ...ctx }: Model.OneHasOneInverseContext & {
|
|
12
|
-
input: Input.UniqueWhere;
|
|
14
|
+
input: Input.UniqueWhere | CheckedPrimary;
|
|
13
15
|
}): Promise<() => Promise<MutationResultList>>;
|
|
14
16
|
connectOrCreate({ input, ...ctx }: Model.OneHasOneInverseContext & {
|
|
15
|
-
input:
|
|
17
|
+
input: MapperInput.ConnectOrCreateInput;
|
|
16
18
|
}): Promise<() => Promise<MutationResultList>>;
|
|
17
19
|
create(ctx: Model.OneHasOneInverseContext & {
|
|
18
|
-
input:
|
|
20
|
+
input: MapperInput.CreateDataInput;
|
|
19
21
|
}): Promise<() => Promise<MutationResultList>>;
|
|
20
22
|
update({ entity, targetEntity, targetRelation, input }: Model.OneHasOneInverseContext & {
|
|
21
|
-
input:
|
|
23
|
+
input: MapperInput.UpdateDataInput;
|
|
22
24
|
}): Promise<() => Promise<MutationResultList>>;
|
|
23
25
|
upsert(context: Model.OneHasOneInverseContext & {
|
|
24
26
|
input: UpdateInputProcessor.UpsertInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneHasOneInverseUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"OneHasOneInverseUpdateInputProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/mapper/update/relations/OneHasOneInverseUpdateInputProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,kBAAkB,EAGlB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,KAAK,OAAO,GAAG,KAAK,CAAC,uBAAuB,CAAA;AAE5C,qBAAa,oCAAqC,YAAW,oBAA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