// DropView will proceed even if some view in the list does not exists.
765363
func (d *ddl) DropView(ctx sessionctx.Context, ti ast.Ident) (err error) {
	schema, tb, err := d.getSchemaAndTableByIdent(ctx, ti)
	if err != nil {
		return errors.Trace(err)
	}

	if !tb.Meta().IsView() {
		return ErrWrongObject.GenWithStackByArgs(ti.Schema, ti.Name, "VIEW")
	}

	job := &model.Job{
		SchemaID:   schema.ID,
		TableID:    tb.Meta().ID,
		Type:       model.ActionDropView,
		BinlogInfo: &model.HistoryInfo{},
	}

	err = d.doDDLJob(ctx, job)
	err = d.callHookOnChanged(err)
	return errors.Trace(err)
}
1170993
func (m *PlannerDefault) WalkDrop(p *Drop) error {
	u.Debugf("WalkDrop %+v", p.Stmt)
	return nil
}
610493
func (session *Session) DropIndexes(bean interface{}) error {
	if session.isAutoClose {
		defer session.Close()
	}

	return session.dropIndexes(bean)
}
594341
func (tx *Tx) DropTable(model interface{}, opt *orm.DropTableOptions) error {
	return orm.DropTable(tx, model, opt)
}
147460
func (mr *MockAdminClientMockRecorder) DropScope(arg0, arg1 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropScope", reflect.TypeOf((*MockAdminClient)(nil).DropScope), arg0, arg1)
}
419022
func (m *DbMap) DropTable(table interface{}) error {
	t := reflect.TypeOf(table)

	tableName := ""
	if dyn, ok := table.(DynamicTable); ok {
		tableName = dyn.TableName()
	}

	return m.dropTable(t, tableName, false)
}
794899
func (l *LoadBalancer) dropConnections(backend NetAddr) {
	tracker := l.connections[backend]
	for _, conn := range tracker {
		conn.Close()
	}
	delete(l.connections, backend)
}
319267
func (db *Database) GetView(designDoc string, view string,
	results interface{}, params *url.Values) error {
	var err error
	var url string
	if params == nil {
		url, err = buildUrl(db.dbName, "_design", designDoc, "_view", view)
	} else {
		url, err = buildParamUrl(*params, db.dbName, "_design",
			designDoc, "_view", view)
	}
	if err != nil {
		return err
	}
	var headers = make(map[string]string)
	headers["Accept"] = "application/json"
	resp, err := db.connection.request("GET", url, nil, headers, db.auth)
	if err != nil {
		return err
	}
	defer resp.Body.Close()

	err = parseBody(resp, &results)
	if err != nil {
		return err
	}
	return nil
}
977936
func (s *Service) PutView(ctx context.Context, c *platform.View) error {
	if c.Properties == nil {
		c.Properties = platform.EmptyViewProperties{}
	}
	s.viewKV.Store(c.ID.String(), c)
	return nil
}
128792
func (engine *Engine) dropAll() error {
	session := engine.NewSession()
	defer session.Close()

	err := session.Begin()
	if err != nil {
		return err
	}
	err = session.dropAll()
	if err != nil {
		session.Rollback()
		return err
	}
	return session.Commit()
}
755977
func (s *Stack) Drop() error {
	if err := s.Close(); err != nil {
		return err
	}

	return os.RemoveAll(s.DataDir)
}
803653
func (t Term) IndexDrop(args ...interface{}) Term {
	return constructMethodTerm(t, "IndexDrop", p.Term_INDEX_DROP, args, map[string]interface{}{})
}
519979
func (s *session) FindView(view View, keys KeyList, container TableListContainer, opts ...GetOption) error {
	action, err := s.recursivelyLoadView(view, keys, container, s.applyGetOption(opts))
	if err != nil {
		return s.catch("FindView: "+action, err)
	}
	return nil
}
497751
func (c *Cache) dropTail() bool {
	tail := c.l.Back()
	if tail == nil {
		return false
	}
	c.removeElement(tail)
	return true
}
204636
func (r Rule) DropOnError() Rule {
	return func(ctx context.Context, e *scheduler.Call, z mesos.Response, err error, ch Chain) (context.Context, *scheduler.Call, mesos.Response, error) {
		if err != nil {
			return ctx, e, z, err
		}
		return r.Eval(ctx, e, z, err, ch)
	}
}
64991
func (jenkins *Jenkins) CreateView(listView ListView) error {
	xmlListView, _ := xml.Marshal(listView)
	reader := bytes.NewReader(xmlListView)
	params := url.Values{"name": []string{listView.Name}}

	return jenkins.postXml("/createView", params, reader, nil)
}
433492
func (g *Gui) View(name string) (*View, error) {
	for _, v := range g.views {
		if v.name == name {
			return v, nil
		}
	}
	return nil, ErrUnknownView
}