Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. 🎓 Dr. Freemo :jpf: 🇳🇱 (freemo@qoto.org)'s status on Tuesday, 24-Dec-2019 14:24:49 UTC 🎓 Dr. Freemo :jpf: 🇳🇱 🎓 Dr. Freemo :jpf: 🇳🇱

    So Gremlin Python ( Tinkerpop 3 ) doesnt have transaction support. So only way to get transaction like behavior is to make sure you do everything in a single database traversal.

    Because I am writing an ORM / OGM model as my base that means I needed to implement something that looks like optimistic locking all my own (only works on immutable write-only graphs). Its a huge pain in the ass.

    Anyway after half a day I finally figured out this is the traversal I need to resolve my optimistic lock when creating a single new node in the DB:

    session.g.E().has('dirty',1).aggregate('x').fold().V().has('dirty',1).aggregate('x').choose(_.V().hasLabel('account').has("fingerprint", "DEADF00D").hasNot('dirty').count().is(0), __.select('x').unfold().properties('dirty').drop()).iterate()

    In conversation Tuesday, 24-Dec-2019 14:24:49 UTC from qoto.org permalink

    Feeds

    • Activity Streams
    • RSS 2.0
    • Atom
    • Help
    • About
    • FAQ
    • Privacy
    • Source
    • Version
    • Contact

    Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

    Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.