Git Product home page Git Product logo

cyphernet's Introduction

mtranter's github stats

cyphernet's People

Contributors

andrew-dddd avatar chandu avatar gitter-badger avatar mtranter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cyphernet's Issues

Expose the Cypher Query as text

A feature to get hold of the last query that the querybilder (CypherEndPoint) have created. For simpler debuging.

(Nice library BTW. :))

CypherNet json serialization

Hi.
I think i've found something wrong in cyphernet. here is the scenario:

I have a person class like this:

public class Person
{
private int age;
private string famil;
private string name;

    public String Name
    {
        get { return name; }
        set { name = value; }
    }

    public String Famil
    {
        get { return famil; }
        set { famil = value; }
    }

    public int Age
    {
        get { return age; }
        set { age = value; }
    }
}

If i want to create a node like the code below, every thing is OK.

neo4JClient = Fluently.Configure("http://localhost:7474/db/data/").CreateSessionFactory().Create();
person = new Person()
{
Name = "hooman",
Famil = "rouhani",
Age = 31,

        };

neo4JClient.CreateNode(person, "Person");

But

If i only don't set Age property like the code below i will give an error.

neo4JClient = Fluently.Configure("http://localhost:7474/db/data/").CreateSessionFactory().Create();
person = new Person()
{
Name = "hooman",
Famil = "rouhani"
};

neo4JClient.CreateNode(person, "Person");

Error detail is:

Debug Trace:
Info: Executing: {"statements":[{"statement":"CREATE (NewNode:Person {"Name":"hooman","Famil":"rouhani","Age":0}) RETURN NewNode as NewNode, id(NewNode) as NewNode__Id, labels(NewNode) as NewNode__Labels;","parameters":{}}]}
Info: Response: {"results":[],"errors":[{"code":"Neo.ClientError.Statement.InvalidSyntax","message":"Invalid input '"': expected whitespace, an identifier, '}' or UnsignedInteger (line 1, column 25)\n"CREATE (NewNode:Person {"Name":"hooman","Famil":"rouhani","Age":0}) RETURN NewNode as NewNode, id(NewNode) as NewNode__Id, labels(NewNode) as NewNode__Labels;"\n ^"}]}

Test method Neo4jCypherNetPractice.Neo4jCypherNetTest.TestDelete threw exception:
Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path 'errors[0]', line 1, position 25.
at Newtonsoft.Json.JsonReader.ReadAsStringInternal()
at Newtonsoft.Json.JsonTextReader.ReadAsString()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader)
at CypherNet.Serialization.DefaultJsonSerializer.Deserialize(String json)
at CypherNet.Transaction.NonTransactionalCypherClient.ExecuteQuery(String cypherQuery)
at CypherNet.Transaction.CypherSession.CreateNode(Object properties, String label)
at Neo4jCypherNetPractice.Neo4jCypherNetTest.TestDelete()


Creating a full path is possible?

From Neo4J docs:

Create a full path
When you use CREATE and a pattern, all parts of the pattern that are not already in scope at this time will be created.

Query

CREATE p =(andres { name:'Andres' })-[:WORKS_AT]->(neo)<-[:WORKS_AT]-(michael { name:'Michael' })
RETURN p

This query creates three nodes and two relationships in one go, assigns it to a path identifier, and returns it.

http://neo4j.com/docs/milestone/query-create.html#create-create-a-full-path

It's possible with CypherNet this query?

Trouble querying nodes of specific label (type)

Probably my noobness but this query should return only nodes labeled "Movie" right? It actually return all nodes in the database.

var nodes = cypherEndpoint
    .BeginQuery(p => new {Movie = p.Node})
    .Match(ctx => ctx.Node(ctx.Vars.Movie))
    .Return(ctx => new {Movie = ctx.Vars.Movie})
    .Fetch();

The code generates:
MATCH (Movie) RETURN Movie as Movie, id(Movie) as Movie__Id, labels(Movie) as Movie__Labels

But should generate:
MATCH (Movie:Movie) RETURN Movie as Movie, id(Movie) as Movie__Id, labels(Movie) as Movie__Labels

Am I missing something here in my code? :)

GraphEntity Tracking

Should we provide entity tracking? Probably not difficult.. Entity Cache in the Session object and some INotifyPropertyChanged type hoo haa in GraphEntity???

.where clause with logic operation

help me with .where clause, please. i try something like "match a,b where NOT a-->b return b", but couldn't found how i can do this in cyphernet

Cannot find server Version

image

Hi, I tried to connect to my local neo4j database and got the error "Cannot find server Version". What does that mean in the context of this library? I have no trouble with Neo4jClient library, so I didn't anticipate anything with this.

I appreciate any insight. Thank you.

M

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.