Exemplo n.º 1
0
        protected void OnQueryCommand()
        {
            SqlQueryView view = new SqlQueryView();

            view.SelectedConnectionContext = (DatabaseConnectionContext)CurrentNode.DataItem;

            IdeApp.Workbench.OpenDocument(view, true);
        }
Exemplo n.º 2
0
        protected void OnShowDefinitionOnNewWindow()
        {
            TableNode           node           = CurrentNode.DataItem as TableNode;
            IEditSchemaProvider schemaProvider = (IEditSchemaProvider)node.ConnectionContext.SchemaProvider;
            SqlQueryView        view           = new SqlQueryView();

            view.SelectedConnectionContext = node.ConnectionContext;
            view.TextEditor.Insert(0, schemaProvider.GetTableCreateStatement(node.Table));
            IdeApp.Workbench.OpenDocument(view, true);
        }
Exemplo n.º 3
0
        protected void OnQueryCommand()
        {
            TableNode node = (TableNode)CurrentNode.DataItem;

            IdentifierExpression tableId = new IdentifierExpression(node.Table.Name);
            SelectStatement      sel     = new SelectStatement(new FromTableClause(tableId));

            SqlQueryView view = new SqlQueryView();

            view.SelectedConnectionContext = node.ConnectionContext;

            IDbFactory fac = DbFactoryService.GetDbFactory(node.ConnectionContext.ConnectionSettings);

            view.Text = fac.Dialect.GetSql(sel);

            IdeApp.Workbench.OpenDocument(view, true);
        }