fixed graph upsert
This commit is contained in:
Родитель
f8f7d078b6
Коммит
dce99fa890
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "migrate-to-graph",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "migrate-to-graph",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "A tool to migrate existing database to a graph database",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/Microsoft/MigrateToGraph",
|
||||
|
|
|
@ -125,7 +125,7 @@ export class GremlinConnector implements OutputConnector {
|
|||
}
|
||||
|
||||
private vertexEdgeIterator(type: Etype, value: Vertex | Edge, callback: any) {
|
||||
const id = value.properties ? value.properties.id : null;
|
||||
const id = value.id;
|
||||
|
||||
async.waterfall(
|
||||
[
|
||||
|
|
|
@ -8,13 +8,13 @@ export function getAddVertexQuery(vertexObj: Vertex): string {
|
|||
}
|
||||
|
||||
export function getUpdateVertexQuery(vertexObj: Vertex): string {
|
||||
const id = escapeSingleQuote(vertexObj.properties.id);
|
||||
const id = escapeSingleQuote(vertexObj.id);
|
||||
const query = `g.V().hasId('${id}')`;
|
||||
return query + getPropertiesQuery(vertexObj);
|
||||
}
|
||||
|
||||
export function getUpdateEdgeQuery(edgeObj: Edge): string {
|
||||
const id = escapeSingleQuote(edgeObj.properties.id);
|
||||
const id = escapeSingleQuote(edgeObj.id);
|
||||
const query = `g.E().hasId('${id}')`;
|
||||
return query + getPropertiesQuery(edgeObj);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче