public TResult Insert <TResult>(sones.Library.Commons.Security.SecurityToken mySecurityToken, Int64 myTransactionToken, RequestInsertVertex myRequestInsert, Converter.InsertResultConverter <TResult> myOutputconverter) { return(_iGraphDB.Insert <TResult>(mySecurityToken, myTransactionToken, myRequestInsert, myOutputconverter)); }
public override IQueryResult Execute(IGraphDB myGraphDB, IGraphQL myGraphQL, GQLPluginManager myPluginManager, String myQuery, SecurityToken mySecurityToken, Int64 myTransactionToken) { _queryString = myQuery; IQueryResult result; try { result = myGraphDB.Insert <IQueryResult>( mySecurityToken, myTransactionToken, CreateRequest(myPluginManager, myGraphDB, mySecurityToken, myTransactionToken), CreateQueryResult); } catch (ASonesException e) { result = new QueryResult(_queryString, SonesGQLConstants.GQL, 0, ResultType.Failed, null, e); } return(result); }
/// <summary> /// Inserts a vertex and its attributes into the GraphDB instance. /// </summary> /// <param name='myExternalVertexID'> /// the vertex id /// </param> private void InsertVertex(XmlReader myReader, String myExternalVertexID) { IVertex addedVertex = null; if (!_VertexIDMapper.ContainsKey(myExternalVertexID)) { var insertRequest = new RequestInsertVertex(_VertexTypeName); // insertRequest.SetUUID(myVertexID); #region store Graphml VertexID insertRequest.AddStructuredProperty(GraphMLTokens.VERTEX_ID_NAME, myExternalVertexID); #endregion #region read vertex attributes ReadVertexAttributes(myReader, insertRequest); #endregion // insert vertex addedVertex = _GraphDB.Insert <IVertex>( _SecurityToken, _TransactionToken, insertRequest, (stats, v) => v ); if (addedVertex != null) { // create mapping between external and internal VertexID _VertexIDMapper.Add(myExternalVertexID, addedVertex.VertexID); } } }
public override QueryResult Execute(IGraphDB myGraphDB, IGraphQL myGraphQL, GQLPluginManager myPluginManager, String myQuery, SecurityToken mySecurityToken, Int64 myTransactionToken) { _queryString = myQuery; QueryResult result; try { result = myGraphDB.Insert<QueryResult>( mySecurityToken, myTransactionToken, CreateRequest(myPluginManager, myGraphDB, mySecurityToken, myTransactionToken), CreateQueryResult); } catch (ASonesException e) { result = new QueryResult(_queryString, SonesGQLConstants.GQL, 0, ResultType.Failed, null, e); } return result; }