std::vector<neo4j_value_t> Neo4J::runQueryTransactions(std::string query,
int counter)
{
try {
std::vector<neo4j_value_t> ret;
neo4j_value_t params = neo4j_null;
neo4j_result_stream_t *results = neo4j_run(session, query.c_str
(), neo4j_null);
if (results == NULL)
{
char buf[256];
neo4j_strerror(errno, buf, sizeof(buf));
printf("err=%s errno=%d\n",buf,errno);
}
neo4j_result_t *record = neo4j_fetch_next(results);
if (record)
{
for (int i = 1; i <= counter; i++)
{
neo4j_value_t value = neo4j_result_field(record, i);
ret.push_back(value);
}
}
neo4j_close_results(results);
return ret;
} catch (...) {
printf("\nError when create transactions, query=%s\n",query.
c_str());
return std::vector<neo4j_value_t>();
}
}
and query was:
MERGE (t_1:Transaction {
tstamp: "2010-09-16 07:03:47",
blockht: 80000,
thash: "5a4ebf66822b0b2d56bd9dc64ece0bc38ee7844a23ff1d7320a88c5fdb2ad3e2",
idtx: 80000,
fee: 0,
size: 158
})
MERGE (t_2:Transaction {
tstamp: "2010-09-16 07:03:47",
blockht: 80000,
thash: "c06fbab289f723c6261d3030ddb6be121f7d2508d77862bb1e484f5cd7f92b25",
idtx: 80000,
fee: 0,
size: 134
})
RETURN ID(t_1) as tid_1,
ID(t_2) as tid_2
err=Invalid argument errno=22
This query in Java client was corect (?)
--
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/d/optout.