Questions tagged [neoism]

8 questions
2
votes
1 answer

Receiving nested Neo4j resutls with Golang

I have a problem with transferring a response from Neo4j to Golang using neoism. The Neo4j response has nested structure and is assembled with Neo4j plugin in the following way. I can see that the response is correct in the Neo4j panel. The problem…
Mykola Makhynko
  • 113
  • 2
  • 10
2
votes
1 answer

result of cypher query on neoism golang

I have a function to delete "User" node and return count deleted node, but it always return -1. func DeleteUser(userid int) (int, error) { stmt := ` MATCH (u:User) WHERE u.userId = {userid} delete u RETURN count(u) ; ` …
kien bui
  • 1,760
  • 2
  • 17
  • 33
0
votes
1 answer

Have difficult CYPHER query about collection using neoism golang?

I build a social network, when a comment include mentions (like Facebook), I send a comment json to webservice: { "owner": 5, // id of user write comment "message": "text", "mentions":[ { "id": 1, // user…
kien bui
  • 1,760
  • 2
  • 17
  • 33
0
votes
1 answer

neoism how to parse query with "path" result

I have this query: match path = (test:Test {t_name:"Test-1"})-[r*]->(child) return path Json response: results [1] - columns[1] - 0: path - data[6] - row[1] - meta[1] - graph - nodes[2] - relationships[1] How to…
amerikiwi
  • 11
  • 1
0
votes
2 answers

Neoism relate if relationship doesn't exist

I've only just started using neoism and enjoying it so far. I've hit a bit of a problem and wondered if it my naivety of neoism or neoism itself that's at fault. I've got a line in my go code: agent.Relate(relation, node.Id() , neoism.Props{}) The…
Airomega
  • 574
  • 6
  • 22
0
votes
1 answer

Insert thousand nodes to neo4j using golang

I am importing data to neo4j using neoism, and I have some issues importing big data, 1000 nodes, would take 8s. here is a part of the code that imports 100nodes. quite basic code, needs improvement, anyone can help me improve this? var wg…
Hokutosei
  • 2,114
  • 5
  • 24
  • 42
0
votes
2 answers

Uniqueness constraint does not prevent from adding same data on Neo4j

I want to create a neo4j database with users. I want the following properties to be unique: username email token What I've tried: CREATE CONSTRAINT ON (user:User) ASSERT user.username IS UNIQUE CREATE CONSTRAINT ON (user:User) ASSERT user.email IS…
marc_aragones
  • 4,344
  • 4
  • 26
  • 38
0
votes
2 answers

How can I clean up this return type for neoism go-lang?

This model I am trying to make with neoism is working now but I can't figure out how to make the return type shorter and or cleaner looking. There must be a way to make this: []struct { UserId string "json:\"account.UserId\""; FirstName string…
earlonrails
  • 4,966
  • 3
  • 32
  • 47