Hi Michael, Thanks for your reply. I guess with jdbc driver, we can't have named params. it should be indexes i.e. 1, 2 .. Please correct me if I am wrong. I tried two executions with params approach: 1. String neo4jQuery = "create (Project{projectId:{1}, projectName:{2}})"; Neo4jPreparedStatement neostmt1 = (Neo4jPreparedStatement) neo4jconn.prepareStatement(neo4jQuery); neostmt1.setInt(1, 1); neostmt1.setString(2, "Puneet's Test"); ResultSet neors1 = neostmt1.executeQuery(); It worked!!
2. Map<String, Object> props = new HashMap<String, Object>(); props.put("projectId", 2); props.put("projectName", "Puneet's Test1"); String neo4jQuery = "create (Project{{1}})"; Neo4jPreparedStatement neostmt1 = (Neo4jPreparedStatement) neo4jconn.prepareStatement(neo4jQuery); neostmt1.setObject(1, props); ResultSet neors1 = neostmt1.executeQuery(); It failed with param parsing error. Can you suggest a way how it can work? As well named params are possible? - Puneet On Monday, 16 December 2013 06:07:42 UTC+5:30, Michael Hunger wrote: > > Use a parameter for the name this takes this repsonsibilty from you. > > create (test:Test{name:{name}}) >>> >> > and then provide the parameters to that query as map, > { "parameters": { "name" : "don't know" }} > > Otherwise use double quotes around the single quoted string. > > Michael > > Am 10.12.2013 um 18:36 schrieb Puneet Garg <puneet....@gmail.com<javascript:> > >: > > Hi, > Thanks for you reply. My first question was when I execute a query(create > (test:Test{name:"don't know"})) using Neo4j jdbc driver it doesn't work. It > breaks at single quote position. How I can make it work with jdbc driver. > As well jdbc driver prints every query executed on console. Do you know a > configuration which will stop printing every query execution on console? > > -Puneet > > On Friday, 6 December 2013 00:48:56 UTC+5:30, Wes Freeman wrote: >> >> Not sure about the JDBC driver question, but... the 1000 limit is only on >> browser, it will work on real call to cypher. While testing your queries >> you can add a limit to the end to see them in browser. >> >> On Thu, Dec 5, 2013 at 2:09 PM, Puneet Garg <puneet....@gmail.com> wrote: >> >>> Hi, >>> I am using Neo4j JDBC driver to migrate my data to Neo4j DB. I am >>> building cypher query in java and executing them using JDBC driver. I have >>> one property value with single quote. So my cypher query is >>> create (test:Test{name:'don't know'}) >>> Above query fails due to single quote in the value. On my java side I am >>> wrapping my string with double quote, but when driver fires query, I see on >>> my console query with single quote. >>> >>> Another issue on Neo4j server browser console if my query returns more >>> than 1000 results. It doesn't print, gives me a message saying "result data >>> is more than 1000". >>> Is that a limitation? Will it not come when i execute query using JDBC >>> driver and print all records data? >>> >>> Can someone please help me with above issues? >>> >> > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+un...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.