Comments (6)
Hi @marciodebarros. I am super busy this week and I haven't looked closely at this, but I can maybe get you started. Yes, a set card property in goblin expects to be assigned a set. After the set is assigned, then you can add. You should be able to initialize with say, a string literal, and it will wrap it up in a set for you.
As far as the doubled IPs in the set, you shouldn't be able to do that. I will look more closely at this.
The server error looks like you are jusing Janus graph and you have not defined a set card property in your schema...this is a requirement. If you are not using Janus, please let me know.
from goblin.
Hi @davebshow I am indeed using Janus. Regarding the schema, I haven't defined one as I was hoping that would get defined implicitly. Is this something that Goblin currently supports or will I need to do from Gremlin console ? Thank you.
from goblin.
Made any progress here? You can define the schema either in the gremlin console or by submitting a string using the client provided by aiogremlin. Automatic schema creation does not work (AFAIK) with multi-card properties
from goblin.
Hi Dave. Yes, I defined the schema using the console, but now I am running into a new (expected) issue which I need to resolve before I can validate the .set() issue. Now because I have defined a Unique constraint on some of my Vertices, when I try to add a existing vertex, I get an constraint violation error. In an OGM I was using for Neo4j there was an "add or update" method which would handle that. Does TinkerPop/JanusGraph have a similar option, or would I have to implement it myself? Would this be something that you would eventually consider for implementation on Goblin ?
from goblin.
I'm also interested in an create_or_update functionality it looks like this can be accomplished in one go:
e.g.
g.v('userId').fold().coalesce(unfold(), addV('users').property('id', 'userId'))
But I am not sure how to best do this via goblin's session.
from goblin.
Do you mean that you would like to issue a traversal like that using Goblins session? Or integrate that functionality into Goblin? The traversal should be straightforward:
# all required imports +
from gremlin_python import statics
# loading statics enables __.unfold() to be unfold() etc.
statics.load_statics(globals())
#... in async function
session = await app.session()
await session.g.V('userId').fold().coalesce(unfold(), addV('users').property('id', 'userId')).iterate()
That is untested, but something like that should work.
from goblin.
Related Issues (20)
- Reference instance to test goblin against HOT 3
- How to change version of Goblin OGM Serializer for Janusgraph (TinkerPop 3.2.6) HOT 3
- TypeError: unhashable type: 'dict' when creating an Edge HOT 10
- goblin does not work with aiohttp>=3.0.0 HOT 5
- Vertex property gets changed from Gremlin Console but not from Python/Goblin script HOT 2
- goblin not working with aiohttp (server) HOT 2
- Mocking JanusGraph Connection for unit tests
- Add method to easily remove Vertex HOT 1
- The project appears idle, can I take over? HOT 10
- Problem with Edge data type HOT 5
- App/Cluster configuration using URL HOT 3
- Schema generator HOT 3
- Belated License change HOT 5
- Question: Extent to which OO modeling is supported in Goblin HOT 7
- How to use mixed index in goblin? HOT 4
- AttributeError: AsyncGraphTraversal.last_traverser HOT 1
- [Proposal] - OGM distinct from driver HOT 7
- Ability to set vertex or edge ID HOT 5
- Unexpected results when updating property HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goblin.