-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get and reset T_Id Sequence #71
Conversation
…ater is the plugin and this is the library
Upsi. Wrong model in pg test. Will fix it... |
).format(value) | ||
except pyodbc.errors.Error as e: | ||
error_message = " ".join(e.args) | ||
return False, self.tr("Could not reset sequence: {}").format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would not be better to throw an exception instead of returning false? I'm thinking more general that only this case. Or is it a design décision for the library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oopsi. Haven't seen this before merging. Good input, but I wanted it to make it identical to other functions. Some (e.g.) create_baskets are called for multiple baskets, where in the frontend I 'collect' all the feedbacks and return it in a list. Kind of "5 of 10 baskets are not created" or similar.
This is a very powerful thingy that should be handled very carefully.
Reset the Sequences
GPKG
PG
Limitations or "What is with conflicts?"
GPKG
When resetting the value and then run into conflicts.
Because of the unique constraints it just counts it up - means it continues to work with the tablewide t_id (I guess it takes the Geopackage Function AUTOGENERATE)...
Our t_ili_tids are of course fucked up then...
On another table of course it works but on validation of course it has troubles then because of duplicates.
PG
Similar but not same on postgres. When resetting the sequence, it just counts up with it, but because of unique constraint it cannot store the feature.
On another table of course it works but on validation of course it has troubles then because of duplicates.