Exemplo n.º 1
0
        private void OpenRegisterScriptClicked(object sender, EventArgs args)
        {
            DesignerInfo         info   = Dataphoria.GetDefaultDesigner("d4");
            DocumentDesignBuffer buffer = new DocumentDesignBuffer(Dataphoria, LibraryName, "Register");

            Dataphoria.OpenDesigner(info, buffer);
        }
Exemplo n.º 2
0
        public void Analyze()
        {
            PrepareForExecute();

            string plan;
            var    errors = new ErrorList();

            try
            {
                using (var statusForm = new StatusForm(Strings.ProcessingQuery))
                {
                    DateTime startTime = DateTime.Now;
                    try
                    {
                        var paramsValue = new DataParams();
                        paramsValue.Add(DataParam.Create(Dataphoria.UtilityProcess, "AQuery", GetTextToExecute()));
                        plan = ((DAE.Runtime.Data.Scalar)Dataphoria.EvaluateQuery("ShowPlan(AQuery)", paramsValue)).AsString;
                    }
                    finally
                    {
                        TimeSpan elapsed = DateTime.Now - startTime;
                        _executionTimeStatus.Text = elapsed.ToString();
                    }
                }
            }
            catch (Exception exception)
            {
                errors.Add(exception);
                ProcessErrors(errors);
                SetStatus(Strings.ScriptAnalyzeFailed);
                return;
            }

            SetStatus(Strings.ScriptAnalyzeSuccessful);

            var analyzer = (Analyzer.Analyzer)Dataphoria.OpenDesigner(Dataphoria.GetDefaultDesigner("pla"), null);

            analyzer.LoadPlan(plan);
        }
Exemplo n.º 3
0
 private void OpenDesigner(DesignerInfo info)
 {
     Dataphoria.OpenDesigner(info, GetBuffer());
 }