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 and LocalStorage #462
Comments
Nice catch - a clear bug... Made a version making it easy to compare expected and actual output |
okay, glad I did report it then, will improve alasql a tiny bit then :) |
👍 |
Same problem here, it does not generate id... |
I was wondering, will this be fixed? |
Sorry my short answer from a phone. Yes it will be solved - it's an error - but can't tell you when. In this moment we are transforming the code base to ES6. It depends on when people like @agershun take the time to get into the nitty gritty... |
Okay, I understand the problem. Wish I could be of some help on the subject, but my Javascript skills are far from suited for these kind of projects. Good luck with the codebase rewrite, a huge job, I guess.. |
Sorry i cant come with a better answer... I really have no idea when someone will feel in the mood to dig into the issue. From November 27 to December 27 we had the following activity:
So guess some people still seek to improve the library. I am sure that if you have an urgent need you can hire @agershun to spend the time needed to fix this. |
Thanks, I'll wait till someone will pick up the issue. |
Sorry for late answer, I will try to fix it in one or two days. Отправлено с iPhone
|
Thanks a lot @agershun! |
It was harder than expected... Sorry for delay |
Is there any progress on this issue? {"columnid":"_id","dbtypeid":"INTEGER","identity":{"value":1,"step":1}} |
Same thing for FileStorage. |
#722 is also having the problem. Any help on this one would be aprechiated. |
@mathiasrw So, i tracked it down, at least for Local Storage: Normal ('memory') storage, uses the table.insert() method. Local Storage uses the LS.intoTable() method.
The main difference is the need for an increment operator on ident.value file: alasql.js |
Really really awesome - thanks :) Would you like to make a pull request so the code can correctly be attributed to you? If not, let me know and Ill implement your suggestion... |
@mathiasrw The table.insert() method, has a second for-loop that raises the identity.value by an amount of identity.step after the row is inserted.
This then also needs to be implemented in LS.intoTable() after the row is concated to the database. Also, this solution probably also needs implementing in other DB engines. Would you review and implement the solution for me? |
Sure! |
It looks sufficient to increment
? |
Still an issue for me. Chrome & local storage |
Version alasql 0.4.8 still have this issue. Auto increment does not work. My project is using FILESTORAGE DATABASE |
Solved? Great! I left Alasql a while ago as it didn't seem to be actively maintained any more, might reconsider that now though. |
@mathiasrw Very thanks to that. Our team were considering use alasql as some of the repositories of a PowerBI alternative. We stopped becouse of this index issue and another one: we tried to do a left join, but it dident bring results using FILESTORAGE DATABASE We will keep our eyes on it, it is a amzing project. |
Its driven by people contributing - if you need the features fixed it would help greatly if you look into where the problem is located. Like #1013 - so that we together can improve the quality. |
When using localstorage, AUTO_INCREMENT doesn't seem to function, as though without specifying a storage method it does work, is this intended behaviour or am I implementing it incorrect?
my implementation of A_I with localstorage: http://jsfiddle.net/gym7L42r/
The text was updated successfully, but these errors were encountered: