File tree Expand file tree Collapse file tree
xyz-util/src/main/resources/sql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,9 +100,11 @@ class DatabaseWriter {
100100 }
101101 catch ( e ) {
102102 if ( e . sqlerrcode === SQLErrors . CONFLICT ) {
103+ //TODO: Implement a robust solution with recursive retries by using a callbackFunction
103104 let onVersionConflict = options ?. onVersionConflict ;
104105
105- if ( onVersionConflict == null ) {
106+ //TODO: handle different Strategies separately
107+ if ( onVersionConflict == null || onVersionConflict !== "ERROR" ) {
106108 const versionParameterIndex = options ?. versionParameterIndex ?? 1 ;
107109 const originalVersion = parameters [ versionParameterIndex ] ;
108110 parameters [ versionParameterIndex ] = FeatureWriter . getNextVersion ( false ) ;
@@ -122,6 +124,7 @@ class DatabaseWriter {
122124
123125 let exceptionToThrow ;
124126
127+ //TODO: Distinguish better different Strategies
125128 if ( onVersionConflict === "ERROR" )
126129 exceptionToThrow = new VersionConflictError ( `Version conflict while trying to write feature with ID ${ parameters [ 0 ] } in version ${ parameters [ 1 ] } .` ) ;
127130 else
You can’t perform that action at this time.
0 commit comments