// Unscoped always disable struct tag "deleted"
331432
func (engine *Engine) Unscoped() *Session {
	session := engine.NewSession()
	session.IsAutoClose = true
	return session.Unscoped()
}
1068516
func (s *Sentry) Untag(key string) {
	s.Lock()
	delete(s.client.Tags, key)
	s.Unlock()
}
240383
func (user *User) Unlurk(post ExistingPost) error {
	if post == nil {
		return errors.New("Unable to unlurk undefined post!")
	}

	switch post.(type) {
	case *UserPost:
		userPost := post.(*UserPost)
		return Db().Where(&UserPostLurk{From: user.ID(), Hpid: userPost.ID()}).Delete(UserPostLurk{})

	case *ProjectPost:
		projectPost := post.(*ProjectPost)
		return Db().Where(&ProjectPostLurk{From: user.ID(), Hpid: projectPost.ID()}).Delete(ProjectPostLurk{})
	}

	return errors.New("Invalid post type " + reflect.TypeOf(post).String())
}
741287
func (e *Store) NamespaceScoped() bool {
	if e.CreateStrategy != nil {
		return e.CreateStrategy.NamespaceScoped()
	}
	if e.UpdateStrategy != nil {
		return e.UpdateStrategy.NamespaceScoped()
	}

	panic("programmer error: no CRUD for resource, you're crazy, override NamespaceScoped too")
}
867656
func (h *SessionHandle) DropBindRecord(record *BindRecord) {
	meta := &BindMeta{BindRecord: record}
	meta.Status = deleted
	hash := parser.DigestHash(record.OriginalSQL)
	h.ch.removeDeletedBindMeta(hash, meta)
	h.appendBindMeta(hash, meta)
}
501479
func (n *Node) IsIDRemoved(id uint64) bool {
	return n.cluster.IsIDRemoved(id)
}
549415
func (i *Index) Unmapped() (n uint64, ok bool) {
	if i.unmapped == nil {
		return 0, false
	}
	return *i.unmapped, true
}
378697
func NewUnregisterArgs(scopeURL string) *UnregisterArgs {
	args := new(UnregisterArgs)
	args.ScopeURL = scopeURL
	return args
}
1047846
func (mc *MessageCache) GetUncached(c context.Context, cset config.Set, path string,
	msg proto.Message) error {

	return cfgclient.Get(c, cfgclient.AsService, cset, path, textproto.Message(msg), nil)
}
60648
func unconstNode(expr Expr) Expr {
	// Special case for non-const builtin calls which must have their args unconsted
	if e, ok := expr.(*CallExpr); ok && (e.IsConst() || e.isBuiltin) {
		u := new(CallExpr)
		*u = *e
		u.constValue = constValue{}
		if u.isBuiltin {
			u.CallExpr = new(ast.CallExpr)
			*u.CallExpr = *e.CallExpr
			u.Args = make([]Expr, len(e.Args))
			for i := range e.Args {
				if e.Args[i].IsConst(); ok {
					u.Args[i] = unconstNode(e.Args[i])
				} else {
					u.Args[i] = e.Args[i]
				}
			}
		}
		return u
	}

	if !expr.IsConst() {
		return expr
	}
	switch e := expr.(type) {
	case *Ident:
		u := new(Ident)
		*u = *e
		u.constValue = constValue{}
		return u
	case *BasicLit:
		u := new(BasicLit)
		*u = *e
		u.constValue = constValue{}
		return u
	case *SelectorExpr:
		u := new(SelectorExpr)
		*u = *e
		u.constValue = constValue{}
		return u
	case *IndexExpr:
		u := new(IndexExpr)
		*u = *e
		u.constValue = constValue{}
		return u
	case *UnaryExpr:
		u := new(UnaryExpr)
		*u = *e
		u.constValue = constValue{}
		return u
	case *BinaryExpr:
		u := new(BinaryExpr)
		*u = *e
		u.constValue = constValue{}
		return u
	default:
		panic("eval: impossible. non-const node IsConst() returned true")
	}
}
622388
func (c *adminClient) TruncateScope(ctx context.Context, s string) error {
	return c.connector.TruncateScope(ctx, s)
}
549901
func (u *DeleteResult) UnmarshalJSON(b []byte) error {
	type wrap struct {
		// Metadata : Metadata of the deleted object.
		Metadata json.RawMessage `json:"metadata"`
	}
	var w wrap
	if err := json.Unmarshal(b, &w); err != nil {
		return err
	}
	Metadata, err := IsMetadataFromJSON(w.Metadata)
	if err != nil {
		return err
	}
	u.Metadata = Metadata
	return nil
}
473312
func (dbcr *DiskBlockCacheRemote) DeleteUnmarked(
	_ context.Context, _ tlf.ID, _ string, _ DiskBlockCacheType) error {
	panic("DeleteUnmarked() not implemented in DiskBlockCacheRemote")
}
575817
func (i *Index) Unmapped() (n uint64, ok bool) {
	if i.idx.Unmapped == nil {
		return 0, false
	}
	return *i.idx.Unmapped, true
}
1088273
func Unlogged(w http.ResponseWriter) http.ResponseWriter {
	if rl, ok := w.(*respLogger); ok {
		return rl.w
	}
	return w
}
171093
func (s *Comment) SetDeleted(v bool) *Comment {
	s.Deleted = &v
	return s
}
630999
func (ncs *nodeCacheStandard) Unlink(
	ref data.BlockRef, oldPath data.Path, oldDe data.DirEntry) (undoFn func()) {
	if ref == (data.BlockRef{}) {
		return nil
	}

	// Temporary code to track down bad block pointers. Remove (or
	// return an error) when not needed anymore.
	if !ref.IsValid() {
		panic(InvalidBlockRefError{ref})
	}

	ncs.lock.Lock()
	defer ncs.lock.Unlock()
	entry, ok := ncs.nodes[ref]
	if !ok {
		return nil
	}

	if entry.core.cachedPath.IsValid() {
		// Already unlinked!
		return nil
	}

	oldParent := entry.core.parent
	oldName := entry.core.pathNode.Name

	entry.core.cachedPath = oldPath
	entry.core.cachedDe = oldDe
	entry.core.parent = nil
	entry.core.pathNode.Name = ""

	return func() {
		entry.core.cachedPath = data.Path{}
		entry.core.cachedDe = data.DirEntry{}
		entry.core.parent = oldParent
		entry.core.pathNode.Name = oldName
	}
}