Skip to content

AUTO_INCREMENT and LocalStorage #462

Closed

Description

@error39

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/

Activity

  1. mathiasrw commented on Nov 20, 2015

    @mathiasrw
    Member
  2. error39 commented on Nov 20, 2015

    @error39
    Author

    okay, glad I did report it then, will improve alasql a tiny bit then :)
    Really appreciate all the work that has gone into this GREAT project, thumbs up!

  3. mathiasrw commented on Nov 20, 2015

    @mathiasrw
    Member

    👍

  4. glaucocustodio commented on Nov 20, 2015

    @glaucocustodio

    Same problem here, it does not generate id...

  5. error39 commented on Nov 28, 2015

    @error39
    Author

    I was wondering, will this be fixed?

  6. mathiasrw commented on Nov 28, 2015

    @mathiasrw
    Member

    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...

  7. error39 commented on Dec 23, 2015

    @error39
    Author

    Okay, I understand the problem.
    But do you have a slight idea when this (kind of basic) functionality will be added/fixed then?
    In - like - a month or more likely 6 months or a year?
    You've all done a great job with this library and for future projects I'd be happy to know if it's actively maintained, or if it's just a more or less finished project?

    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..

  8. mathiasrw commented on Dec 27, 2015

    @mathiasrw
    Member

    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:

    • 6 authors have pushed 44 commits (4 Pull requests)
    • 86 files have changed
    • 19 Issues created
    • 10 Issues closed

    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.

  9. error39 commented on Dec 27, 2015

    @error39
    Author

    Thanks, I'll wait till someone will pick up the issue.
    In the mean time I'll stick to a custom workaround which auto-increments at every INSERT statement

  10. agershun commented on Dec 27, 2015

    @agershun
    Member

    Sorry for late answer, I will try to fix it in one or two days.

    Отправлено с iPhone

    27 дек. 2015 г., в 11:06, error39 [email protected] написал(а):

    Thanks, I'll wait till someone will pick up the issue.
    In the mean time I'll stick to a custom workaround which auto-increments at every INSERT statement

    —
    Reply to this email directly or view it on GitHub.

  11. error39 commented on Dec 28, 2015

    @error39
    Author

    Thanks a lot @agershun!

  12. agershun commented on Dec 29, 2015

    @agershun
    Member

    It was harder than expected... Sorry for delay

  13. seb-ster commented on Mar 24, 2016

    @seb-ster
    Contributor

    Is there any progress on this issue?
    It's not working in on W10, FF45 with AlaSQL v0.2.5 and local storage.
    [edit]
    checked out the local storage property in the DOM. The table definition seems correct:

    {"columnid":"_id","dbtypeid":"INTEGER","identity":{"value":1,"step":1}}

  14. 12 remaining items

  15. kanghj commented on Feb 6, 2017

    @kanghj
    Contributor

    It looks sufficient to increment ident.value in LS.restoreTable. We can obtain the value of the step using ident.step, so the solution should look something like:

    for (var columnid in tb.identities) {
    	  var ident = tb.identities[columnid];
    
    	  for (var index in value) {
    	    value[index][columnid] = ident.value;
    	    ident.value += ident.step;
    	  }      
    }
    

    ?

  16. self-assigned this
    on Feb 8, 2017
  17. added a commit that references this issue on Mar 19, 2017
  18. alshdavid commented on Jun 21, 2018

    @alshdavid

    Still an issue for me. Chrome & local storage

  19. calebeaires commented on Aug 2, 2018

    @calebeaires

    Version alasql 0.4.8 still have this issue. Auto increment does not work. My project is using FILESTORAGE DATABASE

  20. classofoutcasts commented on Aug 5, 2018

    @classofoutcasts

    Solved? Great! I left Alasql a while ago as it didn't seem to be actively maintained any more, might reconsider that now though.

  21. calebeaires commented on Aug 5, 2018

    @calebeaires

    @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.

  22. mathiasrw commented on Aug 5, 2018

    @mathiasrw
    Member

    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.

  23. added a commit that references this issue on Jul 11, 2024
    6d43479
  24. mayae29 commented on Mar 4, 2025

    @mayae29

    guys... is it working now?

  25. mathiasrw commented on Mar 6, 2025

    @mathiasrw
    Member

    Looks like Dontar fixed it in july 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions