private DBInfo.Core.Statement.CreateView ParseCreateViewStatement(CreateView xmlView)
        {
            DBInfo.Core.Model.View v = new DBInfo.Core.Model.View();
            v.Name = xmlView.Name;
            v.Body = xmlView.SourceCode;

            DBInfo.Core.Statement.CreateView cv = new DBInfo.Core.Statement.CreateView();
            cv.View = v;

            return(cv);
        }
Example #2
0
        private void GenerateViews(List <DBInfo.Core.Statement.CreateView> viewList)
        {
            if (!Directory.Exists(OutputDir + "\\" + ViewsDir))
            {
                Directory.CreateDirectory(OutputDir + "\\" + ViewsDir);
            }

            foreach (DBInfo.Core.Statement.CreateView v in viewList)
            {
                CreateView xmlView = new CreateView();
                xmlView.Name       = v.View.Name;
                xmlView.SourceCode = v.View.Body;

                StatementCollection stCol = new StatementCollection();
                stCol.Statement    = new Statement[1];
                stCol.Statement[0] = xmlView;
                generateXMLOutput(stCol, OutputDir + "\\" + ViewsDir + "\\" + v.View.Name + ".view.xml", true);
            }
        }