public override IQueryResult Execute(IGraphDB myGraphDB, IGraphQL myGraphQL, GQLPluginManager myPluginManager, String myQuery, SecurityToken mySecurityToken, Int64 myTransactionToken)
        {
            var sw = Stopwatch.StartNew();

            var _ReturnValues = new Dictionary <String, Object>();

            if (Command_Type == CommandType.Commit)
            {
                myGraphDB.CommitTransaction(mySecurityToken, myTransactionToken);
            }

            else
            {
                myGraphDB.RollbackTransaction(mySecurityToken, myTransactionToken);
            }

            _ReturnValues.Add("TransactionID", myTransactionToken);
            _ReturnValues.Add("ExecutedCommand", Command_Type);
            _ReturnValues.Add("Name", Name == null ? "" : Name);
            _ReturnValues.Add("ASync", ASync);

            return(QueryResult.Success(myQuery, SonesGQLConstants.GQL, new List <IVertexView> {
                new VertexView(_ReturnValues, null)
            }, Convert.ToUInt64(sw.ElapsedMilliseconds)));
        }
        public override IQueryResult Execute(IGraphDB myGraphDB, IGraphQL myGraphQL, GQLPluginManager myPluginManager, String myQuery, SecurityToken mySecurityToken, Int64 myTransactionToken)
        {
            var sw = Stopwatch.StartNew();

            var _ReturnValues = new Dictionary<String, Object>();

            if (Command_Type == CommandType.Commit)
            {
                myGraphDB.CommitTransaction(mySecurityToken, myTransactionToken);
            }

            else
            {
                myGraphDB.RollbackTransaction(mySecurityToken, myTransactionToken);
            }

            _ReturnValues.Add("TransactionID", myTransactionToken);
            _ReturnValues.Add("ExecutedCommand", Command_Type);
            _ReturnValues.Add("Name", Name == null ? "" : Name);
            _ReturnValues.Add("ASync", ASync);

            return QueryResult.Success(myQuery, SonesGQLConstants.GQL, new List<IVertexView> { new VertexView(_ReturnValues, null) }, Convert.ToUInt64(sw.ElapsedMilliseconds));
        }
示例#3
0
 public void RollbackTransaction(sones.Library.Commons.Security.SecurityToken mySecurityToken, Int64 myTransactionToken)
 {
     _iGraphDB.RollbackTransaction(mySecurityToken, myTransactionToken);
 }