Skip to content
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

Napi rewrite #540

Merged
merged 42 commits into from
Dec 15, 2018
Merged

Napi rewrite #540

merged 42 commits into from
Dec 15, 2018

Commits on Dec 15, 2018

  1. Configuration menu
    Copy the full SHA
    11797d8 View commit details
    Browse the repository at this point in the history
  2. Implement open()

    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    71e7823 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9f03290 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1fba29c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e37cda0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    085ef08 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3ede7b3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    20f2aea View commit details
    Browse the repository at this point in the history
  9. Implement iterator()

    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    6889722 View commit details
    Browse the repository at this point in the history
  10. Reuse LD_STRING_OR_BUFFER_TO_COPY() macro in ToSlice() function

    The ToSlice() function corresponds to the old LD_STRING_OR_BUFFER_TO_SLICE()
    macro with the exception that we _always_ copy the buffer/string. I've
    chosen this approach for the following reasons:
    
    * We use the _same_ code for copying buffers/strings for iterators (e.g.
    for lt, lte, gt, gte etc)
    * The code for handling cleanup of leveldb::Slice() should always cleanup
    the underlying buffer (since we always copy)
    * For simplicity. At the moment of rewriting to napi it's a lot to keep
    in the head to move forward.
    
    Later on we should benchmark this and tweak/optimize if needed. Maybe it
    has a huge impact on performance, but until we know this for sure, I think
    we can simplify with good conscience.
    
    The difference between old LD_STRING_OR_BUFFER_TO_COPY
    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    182a58b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    043508a View commit details
    Browse the repository at this point in the history
  12. Implement db_close()

    This concludes the factory-test.js in abstract-leveldown
    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    57b0be4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5613fb5 View commit details
    Browse the repository at this point in the history
  14. Implement db_get()

    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    2acd4b6 View commit details
    Browse the repository at this point in the history
  15. Implement db_del()

    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    8de6618 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6f09aaf View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    f7c6d93 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    64ff8f6 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    52ccc82 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    79966af View commit details
    Browse the repository at this point in the history
  21. Implement the rest of iterator_seek()

    This concludes the full abstract-leveldown test suite
    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    60b7982 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    8aba0c3 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    023deae View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    fc46554 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    0790470 View commit details
    Browse the repository at this point in the history
  26. Implement destroy_db()

    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    ad079a5 View commit details
    Browse the repository at this point in the history
  27. Implement repair_db()

    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    a1f94da View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    ce049dd View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    50062ad View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    1dfe434 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    02cceda View commit details
    Browse the repository at this point in the history
  32. Clean up debug printf

    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    cb15d6e View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    d6001e1 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    8855749 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    6aca8c8 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    cb34bf0 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    41c19a2 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    4bcffea View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    647c3dd View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    42da176 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    d4dd7f0 View commit details
    Browse the repository at this point in the history
  42. Pass in leveldb::Slice into workers and not napi values

    This is more for consistency, there were variants on this. Also makes
    it more clear where the slices are created
    ralphtheninja committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    e80be43 View commit details
    Browse the repository at this point in the history