Git Product home page Git Product logo

Comments (2)

apetenchea avatar apetenchea commented on July 2, 2024

Hello @sushi2all,

Unfortunately, the update_match method (among others, see 7.6.1) had to be refactored, due to their usage of _api/simple HTTP API, which has been long deprecated since ArangoDB 3.4.

The simple queries provided by the /_api/simple endpoint were limited in functionality and internally resorted to AQL queries anyway. Therefore, we kept the driver methods that used to rely on them, but adapted them to use AQL instead. Apart from being safer and up-to-date, users might notice even a performance improvement from this.

Because the filters (e.g. your match dict) have to be part of an AQL query, they are Json serialized now. Normally this shouldn't pose any problems, but there are corner cases, such as with Enum. You'll have to make your Enum Json serializable. There are several ways to go about this, but I would suggest inheriting from str:

class QueueType(str, Enum):
  OPERATOR = 'o'
  EQUIPMENT = 'e'
  SITE = 's'

Similarly, if your Enum is int-based, you can inherit from IntEnum.

Let me know if this helps!

from python-arango.

sushi2all avatar sushi2all commented on July 2, 2024

Your suggestion worked, thank you! 🙏🏻

from python-arango.

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.