Code Monkey home page Code Monkey logo

Comments (2)

xu4wang avatar xu4wang commented on June 7, 2024 1

Hey @xu4wang , thank you for collaborating with the project.

I also investigated with Directus the possibility of transactions, but without success.

Directus uses knex behind the scenes, which itself offers transactions, so i think there is a possibility.

I had also thought of raw queries, but I believe that Directus also does not offer the functionality.

Checked the directus source, I understand if we put the CRUD operations in one API call, for example when we update one item, we can:

  1. Change some fields of the item,
  2. Add more items into another collection via referring a relational filed of the item.

The above 1 and 2 will be executed in one transaction inside Directus.

I think it covers most of my cases.

from dna.

cesarsalesgomes avatar cesarsalesgomes commented on June 7, 2024

Thanks for sharing the project, Nest and Directus are all my preferred platforms too!

I have an issue combining them together.

For example, in real world scenarios, sometimes it's required to update different items in Directus in one API call, I want all those updates all successful, otherwise none of them should be executed.

I was thinking about "transaction... commit ... rollback" but I am not sure how to implement using directus API/SDK?

Hey @xu4wang , thank you for collaborating with the project.

I also investigated with Directus the possibility of transactions, but without success.

Directus uses knex behind the scenes, which itself offers transactions, so i think there is a possibility.

I had also thought of raw queries, but I believe that Directus also does not offer the functionality.

from dna.

Related Issues (3)

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.