// SearchType must be one of "dfs_query_then_fetch", "dfs_query_and_fetch",
// "query_then_fetch", or "query_and_fetch".
551631
func (r *SearchRequest) SearchType(searchType string) *SearchRequest {
	r.searchType = searchType
	return r
}
437230
func (s *ScriptSort) Type(typ string) *ScriptSort {
	s.typ = typ
	return s
}
158950
func (r *BulkDeleteRequest) Type(typ string) *BulkDeleteRequest {
	r.typ = typ
	r.source = nil
	return r
}
1159313
func (r *vstRequest) requestType() int64 {
	switch r.method {
	case "DELETE":
		return 0
	case "GET":
		return 1
	case "POST":
		return 2
	case "PUT":
		return 3
	case "HEAD":
		return 4
	case "PATCH":
		return 5
	case "OPTIONS":
		return 6
	default:
		panic(fmt.Errorf("Unknown method '%s'", r.method))
	}
}
1094730
func (q *Query) GetType() QueryType {
	if q.GetCcQuery() != nil {
		return ChaincodeQueryType
	}
	if q.GetConfigQuery() != nil {
		return ConfigQueryType
	}
	if q.GetPeerQuery() != nil {
		return PeerMembershipQueryType
	}
	if q.GetLocalPeers() != nil {
		return LocalMembershipQueryType
	}
	return InvalidQueryType
}
941691
func (r *Request) Type() string {
	if r.Req == nil {
		return ""
	}
	if len(r.Req.Question) == 0 {
		return ""
	}

	return dns.Type(r.Req.Question[0].Qtype).String()
}
959859
func (rc *SQLiteRows) ColumnTypeScanType(i int) reflect.Type {
	switch C.sqlite3_column_type(rc.s.s, C.int(i)) {
	case C.SQLITE_INTEGER:
		switch C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))) {
		case "timestamp", "datetime", "date":
			return reflect.TypeOf(time.Time{})
		case "boolean":
			return reflect.TypeOf(false)
		}
		return reflect.TypeOf(int64(0))
	case C.SQLITE_FLOAT:
		return reflect.TypeOf(float64(0))
	case C.SQLITE_BLOB:
		return reflect.SliceOf(reflect.TypeOf(byte(0)))
	case C.SQLITE_NULL:
		return reflect.TypeOf(nil)
	case C.SQLITE_TEXT:
		return reflect.TypeOf("")
	}
	return reflect.SliceOf(reflect.TypeOf(byte(0)))
}
1005655
func (c *CloudPersister) QueryMoveTypesByProp(propName, value string) (*types.MoveType, error) {
	ctx := context.Background()
	MoveTypes := make([]*types.MoveType, 0)
	q := datastore.NewQuery("MoveType").Filter(fmt.Sprintf("%s =", propName), value)

	keys, err := c.DatastoreClient().GetAll(ctx, q, &MoveTypes)

	if err != nil {
		return nil, fmt.Errorf("datastoredb: could not list MoveTypes: %v", err)
	}

	if len(MoveTypes) == 0 {
		return nil, nil
	}

	MoveTypes[0].ID = keys[0].ID()
	return MoveTypes[0], nil
}
1265751
func (c *Client) SearchIndex(index string, query interface{}, v interface{}) error {
	b, err := json.Marshal(query)
	if err != nil {
		return err
	}

	return c.Request("POST", fmt.Sprintf("/%s/_search", index), bytes.NewReader(b), v)
}
434783
func (s *TermvectorsService) Type(typ string) *TermvectorsService {
	s.typ = typ
	return s
}
193067
func QueryTypeEqual(o1, o2 *QueryTypeOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
487803
func (m *Miniredis) Type(k string) string {
	return m.DB(m.selectedDB).Type(k)
}
1232396
func (s *SearchService) Types(types ...string) *SearchService {
	if s.types == nil {
		s.types = make([]string, 0)
	}
	s.types = append(s.types, types...)
	return s
}
795562
func (p *page) Type() string {
	if (p.flags & branchPageFlag) != 0 {
		return "branch"
	} else if (p.flags & leafPageFlag) != 0 {
		return "leaf"
	} else if (p.flags & metaPageFlag) != 0 {
		return "meta"
	} else if (p.flags & freelistPageFlag) != 0 {
		return "freelist"
	}
	return fmt.Sprintf("unknown<%02x>", p.flags)
}
969108
func (db *RedisDB) Type(k string) string {
	db.master.Lock()
	defer db.master.Unlock()
	return db.t(k)
}
983063
func (s *SearchDsl) Search(srch string) *SearchDsl {
	s.QueryVal = Query().Search(srch)
	return s
}
347352
func (o *Me) SaaSApplicationTypes(info *bambou.FetchingInfo) (SaaSApplicationTypesList, *bambou.Error) {

	var list SaaSApplicationTypesList
	err := bambou.CurrentSession().FetchChildren(o, SaaSApplicationTypeIdentity, &list, info)
	return list, err
}