protected void OnQueryCommand ()
		{
			SqlQueryView view = new SqlQueryView ();
			view.SelectedConnectionContext = (DatabaseConnectionContext) CurrentNode.DataItem;

			IdeApp.Workbench.OpenDocument (view, true);
		}
Exemple #2
0
        protected override void Run()
        {
            SqlQueryView view = new SqlQueryView();

            IdeApp.Workbench.OpenDocument(view, true);
        }
		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);
		}
		protected override void Run ()
		{
			SqlQueryView view = new SqlQueryView ();
			IdeApp.Workbench.OpenDocument (view, true);
		}
		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);
		}