// Insert adds ep to the EndpointSet.
769108
func (e *EndpointSet) Insert(ep Endpoint) {
	e.mutex.Lock()
	e.endpoints[ep] = struct{}{}
	e.mutex.Unlock()
}
917322
func Insert(eq ...interface{}) *Builder {
	builder := &Builder{cond: NewCond()}
	return builder.Insert(eq...)
}
1122451
func (l *PacketList) insert(e, at *PacketElement) *PacketElement {
	n := at.next
	at.next = e
	e.prev = at
	e.next = n
	n.prev = e
	e.list = l
	l.len++
	return e
}
665618
func (b *Bucket) Insert(key string, value interface{}, expiry uint32) (Cas, error) {
	cas, _, err := b.insert(key, value, expiry)
	return cas, err
}
297630
func Insert(db DB, table string, src interface{}) error {
	return Default.Insert(db, table, src)
}
981376
func (b *Builder) Insert(i int, p []byte) (n int, err error) {
	b.lastRead = opInvalid
	if i < 0 || i > len(b.buf) {
		return -1, ErrInvalidIndex
	}

	m := b.grow(len(p))
	if len(b.buf)-m != len(p) {
		return -1, ErrFailedToGrow
	}
	copy(b.buf[i+len(p):], b.buf[i:len(b.buf)-len(p)])
	return copy(b.buf[i:i+len(p)], p), nil
}
1190461
func (s IPPermissionSet) Insert(items ...*ec2.IpPermission) {
	for _, p := range items {
		k := keyForIPPermission(p)
		s[k] = p
	}
}
717469
func (engine *Engine) Insert(beans ...interface{}) (int64, error) {
	session := engine.NewSession()
	defer session.Close()
	return session.Insert(beans...)
}
703693
func (agp *AuthGroupPermission) Insert(db XODB) error {
	var err error

	// if already exist, bail
	if agp._exists {
		return errors.New("insert failed: already exists")
	}

	// sql insert query, primary key provided by sequence
	const sqlstr = `INSERT INTO public.auth_group_permissions (` +
		`group_id, permission_id` +
		`) VALUES (` +
		`$1, $2` +
		`) RETURNING id`

	// run query
	XOLog(sqlstr, agp.GroupID, agp.PermissionID)
	err = db.QueryRow(sqlstr, agp.GroupID, agp.PermissionID).Scan(&agp.ID)
	if err != nil {
		return err
	}

	// set existence
	agp._exists = true

	return nil
}
186817
func (b *Bulk) Insert(docs ...interface{}) {
	action := b.action(bulkInsert)
	action.docs = append(action.docs, docs...)
}
1146604
func (l *PacketIntervalList) insert(e, at *PacketIntervalElement) *PacketIntervalElement {
	n := at.next
	at.next = e
	e.prev = at
	e.next = n
	n.prev = e
	e.list = l
	l.len++
	return e
}
432537
func (col *Col) Insert(doc map[string]interface{}) (id int, err error) {
	docJS, err := json.Marshal(doc)
	if err != nil {
		return
	}
	id = rand.Int()
	partNum := id % col.db.numParts
	col.db.schemaLock.RLock()
	part := col.parts[partNum]

	// Put document data into collection
	part.DataLock.Lock()
	_, err = part.Insert(id, []byte(docJS))
	part.DataLock.Unlock()
	if err != nil {
		col.db.schemaLock.RUnlock()
		return
	}

	part.LockUpdate(id)
	// Index the document
	col.indexDoc(id, doc)
	part.UnlockUpdate(id)

	col.db.schemaLock.RUnlock()
	return
}
615088
func (ptree *ptree) Insert(keys ...common.Comparator) {
	ia := newInsertAction(keys)
	ptree.checkAndRun(ia)
	ia.completer.Wait()
}
417339
func (aia *AIA) Insert(tx *sql.Tx) error {
	_, err := tx.Exec(`INSERT INTO aia (ski, url) values (?, ?)`, aia.SKI, aia.URL)
	return err
}
261284
func (part *Partition) Insert(id int, data []byte) (physID int, err error) {
	physID, err = part.col.Insert(data)
	if err != nil {
		return
	}
	part.lookup.Put(id, physID)
	return
}
708106
func (r *AppPackageService) Insert(appId string, version string, package_ *Package) *AppPackageInsertCall {
	c := &AppPackageInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.appId = appId
	c.version = version
	c.package_ = package_
	return c
}
606004
func (c *C) Insert(o []byte) error {
	c.m.Lock()
	defer c.m.Unlock()
	f, err := c.file()
	if err != nil {
		return err
	}
	f.Seek(0, os.SEEK_END)
	f.Write(o)
	f.WriteString(fmt.Sprintln())
	return nil
}