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
AUTO_INCREMENT #171
AUTO_INCREMENT #171
Conversation
Optional feature I saw that you added optional methods in
Let's exclude Then, you don't need to provide specific implementation patterns to users. Current methods, How about making this simple as possible? pub trait AutoIncrement<T: Debug> {
async fn generate_id(table_name, column_name) -> Result<T>;
} Then using this, we can only need to call Preparing space for auto increment id, it is all up to storage implementation. (btw, little bit off the topic, you might worry about this may make INSERT query execution not to be atomic. Let's don't care about it for now, we can also restore atomic in INSERT using different pr) |
Oh I just found a mistake in my prev opinion. AutoIncrement trait may not need to use T because it returns numeric id rather than key T. |
This makes sense. |
Hello, There should be some ANSI like
There are a set of solutions depending on supplier |
@willy610 Thus if you are |
@KyGost
I did had some concerns some years ago on a complex system. (Perhaps I was confused by the Export/Import options in the tool phpmyadmin.php. |
@willy610 yup, it only ever bothers generating a value if it doesn't have one. As for |
I've spent a little too long from this issue and don't remember what was in my way. I've rebased it to main and it seems to be working. Moving out of draft. |
…into auto_increment_4
This PR has become a bit of a mess. Will make a new one. |
Resolve #159
Attempt #164
Attempt #165