Giter Site home page Giter Site logo

Comments (3)

JKHeadley avatar JKHeadley commented on June 9, 2024

@yoieh Thanks for bringing this up. Soft delete is a tricky feature to manage and I'm definitely open to ideas. For your needs I think the current solution would be to select documents with isDeleted equal to false within the query itself, like so:

http://localhost:8080/permission?$page=2&$limit=10&isDeleted=false

This will give you proper pagination values excluding deleted documents. Does this make sense?

from rest-hapi.

yoieh avatar yoieh commented on June 9, 2024

In my case I still need the deleted documents to be able to remove them from the client. But yes i went with a costume rout as a "sync route". That takes a lastSync=DATE. Then I'm doing the "get list" call with isDeleted=false. Not really optimal to do to calls every time an client updates but it works and also enables an case to update cached documentss on my client. Still there are some other problems with the amount of data that could be receiving buy a new user..
this what's why I needed a way to just know the amount of deleted items of the total.

from rest-hapi.

JKHeadley avatar JKHeadley commented on June 9, 2024

@yoieh lets move the conversation to your PR: #236

from rest-hapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.