// Insert inserts the Interface e into the Tree. Insertions may replace
// existing stored intervals.
188637
func (t *Tree) Insert(e Interface, fast bool) (err error) {
	if e.Start().Compare(e.End()) > 0 {
		return ErrInvertedRange
	}
	var d int
	t.Root, d = t.Root.insert(e, e.Start(), e.ID(), fast)
	t.Count += d
	t.Root.Color = llrb.Black
	return
}
1180263
func (b *Builder) Insert(key []byte, val uint64) error {
	// ensure items are added in lexicographic order
	if bytes.Compare(key, b.last) < 0 {
		return ErrOutOfOrder
	}
	if len(key) == 0 {
		b.len = 1
		b.unfinished.setRootOutput(val)
		return nil
	}

	prefixLen, out := b.unfinished.findCommonPrefixAndSetOutput(key, val)
	b.len++
	err := b.compileFrom(prefixLen)
	if err != nil {
		return err
	}
	b.copyLastKey(key)
	b.unfinished.addSuffix(key[prefixLen:], out)

	return nil
}
385478
func Insert(table string) *InsertBuilder {
	return &InsertBuilder{
		tableName: table,
		query:     fmt.Sprintln(`INSERT INTO`, table),
		lock:      new(sync.Mutex),
	}
}
611119
func (s Int) Insert(items ...int) {
	for _, item := range items {
		s[item] = Empty{}
	}
}
1292664
func (adapter *Adapter) Insert(query grimoire.Query, changes map[string]interface{}, loggers ...grimoire.Logger) (interface{}, error) {
	statement, args := NewBuilder(adapter.Config).Insert(query.Collection, changes)
	id, _, err := adapter.Exec(statement, args, loggers...)
	return id, err
}
1050987
func (treeCursor *treeCursor) insert(astNode ast.Node) bool {
	if astNode == nil {
		// End of branch, go up
		treeCursor.currentDepth--
		treeCursor.current = treeCursor.current.Parent
		return false
	}

	// Allocate memory for a new TreeNode
	treeNode := &TreeNode{}

	treeNode.AstNode = astNode
	treeNode.Depth = treeCursor.currentDepth
	treeNode.Parent = treeCursor.current

	// Append new node to children of the current node
	treeCursor.current.Children = append(treeCursor.current.Children, treeNode)

	// Update cursor, go down
	treeCursor.current = treeNode
	treeCursor.currentDepth++
	return true
}
996537
func (t *Table) Insert() (stmt string, names []string) {
	return t.insert.stmt, t.insert.names
}
769108
func (e *EndpointSet) Insert(ep Endpoint) {
	e.mutex.Lock()
	e.endpoints[ep] = struct{}{}
	e.mutex.Unlock()
}
1017902
func (s IntSet) Insert(items ...int) {
	for _, item := range items {
		s[item] = sets.Empty{}
	}
}
907255
func (t *Txn) Insert(k []byte, v interface{}) (interface{}, bool) {
	newRoot, oldVal, didUpdate := t.insert(t.root, k, k, v)
	if newRoot != nil {
		t.root = newRoot
	}
	if !didUpdate {
		t.size++
	}
	return oldVal, didUpdate
}
325951
func (t *Trie) insert(key []byte, value interface{}, replace bool) bool {
	// an empty tree
	if t.size == 0 {
		t.root.external = &external{
			key:   key,
			value: value,
		}
		t.size = 1
		return true
	}

	n := t.search(key)
	newOffset, newBit, newCont := n.external.criticalBit(key)

	// already exists in the tree
	if newOffset == -1 {
		if replace {
			n.external.value = value
			return true
		}
		return false
	}

	// allocate new node
	newNode := &internal{
		offset: newOffset,
		bit:    newBit,
		cont:   newCont,
	}
	direction := newNode.direction(key)
	newNode.child[direction].external = &external{
		key:   key,
		value: value,
	}

	// insert new node
	wherep := &t.root
	for in := wherep.internal; in != nil; in = wherep.internal {
		if in.offset > newOffset || (in.offset == newOffset && in.bit < newBit) {
			break
		}
		wherep = &in.child[in.direction(key)]
	}

	if wherep.internal != nil {
		newNode.child[1-direction].internal = wherep.internal
	} else {
		newNode.child[1-direction].external = wherep.external
		wherep.external = nil
	}
	wherep.internal = newNode
	t.size += 1
	return true
}
878200
func Insert(newTopic *db.AvailableTopic) string {
	return db.Conn.Insert(db.AvailableTopicCollection, newTopic)
}
108030
func (b *BoltKeyspace) Insert(key string, value []byte) error {

    err := b.db.Update(func(tx *bolt.Tx) error {
        b := tx.Bucket([]byte(b.name))
        err := b.Put([]byte(key), value)
        return err
    })
    return err
}
1262897
func Insert(dst, src string, index int) string {
	return Slice(dst, 0, index) + src + Slice(dst, index, -1)
}
169968
func (s Int64) Insert(items ...int64) {
	for _, item := range items {
		s[item] = Empty{}
	}
}
660673
func (t *Tree) Insert(rr dns.RR) {
	var d int
	t.Root, d = t.Root.insert(rr)
	t.Count += d
	t.Root.Color = black
}
917322
func Insert(eq ...interface{}) *Builder {
	builder := &Builder{cond: NewCond()}
	return builder.Insert(eq...)
}