It Works like a charm, thank you :)

Licio.

Il giorno domenica 9 febbraio 2014 19:27:00 UTC+1, Michael Hunger ha 
scritto:
>
> Jdbc only allows for numeric parameters (starting at 1).
>
> Map<String, Object> params = new HashMap<String, Object>();
> params.put( "name", "a Name" );
>
> Now i'm thinking to do this 
> connection = dataSource.getConnection();
> PreparedStatement preparedStatement = connection.prepareStatement("CREATE 
> ({1})");
> preparedStatement.setObject(1, params);
> preparedStatement.executeQuery();
>
>
> Michael
>
> Am 09.02.2014 um 17:24 schrieb Licio Mazzeo <[email protected]<javascript:>
> >:
>
> Hi all, i have a question. How can i create a node passing the json or a 
> map into prepared statement just like the rest api docs?
>
> Map<String, Object> params = new HashMap<String, Object>();
> params.put( "props", props );
> String query = "CREATE ({props})";
> engine.execute( query, params );
>
> Now i'm thinking to do this 
> connection = dataSource.getConnection();
> PreparedStatement preparedStatement = connection.prepareStatement("CREATE 
> (n{?}");
> preparedStatement.setObject(0, map);
> preparedStatement.executeQuery();
>
> but its sure wrong..
>
> Thank you!!
>
> -- 
> 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 [email protected] <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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to