Giter Site home page Giter Site logo

API rules operators about pocketbase HOT 1 CLOSED

FifthWit avatar FifthWit commented on September 24, 2024
API rules operators

from pocketbase.

Comments (1)

ganigeorgiev avatar ganigeorgiev commented on September 24, 2024

I'm not sure that I understand the purpose of the issue.

If you are asking to limit the increment value of a number field by just 1, then there is no such option and there are no plans to introduce it.

The better approach in your case would be to have a junction collection, eg. "likes" that will contain 2 relation fields pointing to your user and other related record (eg. post). Then you can register a UNIQUE unique constraint (under the "Unique constraints and indexes" collection fields options) for the user-post pair to ensure that a single "user" can like a "post" only once.

See also #4369 and the other linked discussions.

If you have other questions please open a Q&A discussion instead with more details about your use case and what you are trying to do.

from pocketbase.

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.