// Called by the TableView to retrieve if a given row is checked.
15271
func (m *SpiderMenu) Checked(row int) bool {
	return m.items[row].checked
}
191186
func (d *Database) ScanRow(rows *sql.Rows, dst interface{}) error {
	// make sure we always close rows, even if there is a scan error
	defer rows.Close()

	if err := d.Scan(rows, dst); err != nil {
		return err
	}

	return rows.Close()
}
92433
func (d *distinctChecker) Check(values []types.Datum) (bool, error) {
	d.key = d.key[:0]
	var err error
	d.key, err = codec.EncodeValue(d.sc, d.key, values...)
	if err != nil {
		return false, err
	}
	d.vals = d.existingKeys.Get(d.key, d.vals[:0])
	if len(d.vals) > 0 {
		return false, nil
	}
	d.existingKeys.Put(d.key, []byte{})
	return true, nil
}
204713
func (g *Graph) Check(x *Graph) (bool, string) {

	for i := 0; i < g.Len(); i++ {
		ns := g.GetAt(i)
		nx := x.GetAt(i)

		b := ns.checkNode(nx)
		if !b {
			if ns != nil {
				return false, "want " + ns.ThisString() + ", got " + nx.ThisString()
			}
		}

		ok, mess := ns.Check(nx)
		if !ok {
			return false, mess
		}
	}

	return true, ""
}
88789
func (b *batchChecker) getOldRow(ctx sessionctx.Context, t table.Table, handle int64) ([]types.Datum, error) {
	oldValue, ok := b.dupOldRowValues[string(t.RecordKey(handle))]
	if !ok {
		return nil, errors.NotFoundf("can not be duplicated row, due to old row not found. handle %d", handle)
	}
	cols := t.WritableCols()
	oldRow, oldRowMap, err := tables.DecodeRawRowData(ctx, t.Meta(), handle, cols, oldValue)
	if err != nil {
		return nil, err
	}
	// Fill write-only and write-reorg columns with originDefaultValue if not found in oldValue.
	for _, col := range cols {
		if col.State != model.StatePublic && oldRow[col.Offset].IsNull() {
			_, found := oldRowMap[col.ID]
			if !found {
				oldRow[col.Offset], err = table.GetColOriginDefaultValue(ctx, col.ToInfo())
				if err != nil {
					return nil, err
				}
			}
		}
	}
	return oldRow, nil
}
1019897
func (result ObserveResult) CheckPersistence(cas uint64, deletion bool) (persisted bool, overwritten bool) {
	switch {
	case result.Status == ObservedNotFound && deletion:
		persisted = true
	case result.Cas != cas:
		overwritten = true
	case result.Status == ObservedPersisted:
		persisted = true
	}
	return
}
772236
func (s *Selection) Is(selector string) bool {
	return s.IsMatcher(compileMatcher(selector))
}
1113289
func (tu *thresholdUpdater) Check() error {
	tu.mu.Lock()
	defer tu.mu.Unlock()

	if tu.count >= tu.threshold {
		return tu.status
	}

	return nil
}
1171465
func (s *sqlStrConcat) checkObject(n *ast.Ident, c *gosec.Context) bool {
	if n.Obj != nil {
		return n.Obj.Kind != ast.Var && n.Obj.Kind != ast.Fun
	}

	// Try to resolve unresolved identifiers using other files in same package
	for _, file := range c.PkgFiles {
		if node, ok := file.Scope.Objects[n.String()]; ok {
			return node.Kind != ast.Var && node.Kind != ast.Fun
		}
	}
	return false
}
21575
func (c *Verification) Check(m *VerifyCheckRequest) (*VerifyCheckResponse, error) {
	if len(m.RequestID) == 0 {
		return nil, errors.New("Invalid RequestID field specified")
	}

	if len(m.Code) == 0 {
		return nil, errors.New("Invalid Code field specified")
	}

	var verifyCheckResponse *VerifyCheckResponse

	if !c.client.useOauth {
		m.apiKey = c.client.apiKey
		m.apiSecret = c.client.apiSecret
	}

	var r *http.Request
	buf, err := json.Marshal(m)
	if err != nil {
		return nil, errors.New("invalid message struct - unable to convert to JSON")
	}
	b := bytes.NewBuffer(buf)
	r, err = http.NewRequest("POST", apiRootv2+"/verify/check/json", b)
	if err != nil {
		return nil, err
	}

	r.Header.Add("Accept", "application/json")
	r.Header.Add("Content-Type", "application/json")

	resp, err := c.client.HTTPClient.Do(r)
	if err != nil {
		return nil, err
	}

	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}

	err = json.Unmarshal(body, &verifyCheckResponse)
	if err != nil {
		return nil, err
	}
	return verifyCheckResponse, nil
}
1163187
func (d *Database) scanRow(data *structData, rows *sql.Rows, dst interface{}, columns []string) error {
	// check if there is data waiting
	if !rows.Next() {
		if err := rows.Err(); err != nil {
			return err
		}
		return sql.ErrNoRows
	}

	// get a list of targets
	targets, err := d.Targets(dst, columns)
	if err != nil {
		return err
	}

	// perform the scan
	if err := rows.Scan(targets...); err != nil {
		return err
	}

	// post-process and copy the target values into the struct
	if err := d.WriteTargets(dst, columns, targets); err != nil {
		return err
	}

	return rows.Err()
}
175452
func (p *Predicate) Eval(row virtualRow) (bool, error) {

	if p.True {
		return true, nil
	}

	// Find left attribute
	left := p.LeftValue.table + "." + p.LeftValue.lexeme
	val, ok := row[left]
	if !ok {
		return false, fmt.Errorf("Attribute [%s] not found in row", left)
	}
	p.LeftValue.v = val.v

	return p.Operator(p.LeftValue, p.RightValue), nil
}
638864
func (f *fragment) row(rowID uint64) *Row {
	f.mu.Lock()
	defer f.mu.Unlock()
	return f.unprotectedRow(rowID)
}
580965
func (m *SpiderMenu) SetChecked(row int, checked bool) error {
	m.items[row].checked = checked

	return nil
}
1227939
func (fs *fsImpl) Check() {
	fs.mu.Lock()
	defer fs.mu.Unlock()

	for k, v := range fs.inodes {
		if v.lookupCount != 0 {
			panic(fmt.Sprintf("Inode %v has lookup count %v", k, v.lookupCount))
		}
	}
}
488952
func (t *Table) GetSelection() (row, column int) {
	return t.selectedRow, t.selectedColumn
}
1168114
func (s *Sensu) GetCheck(check string) (map[string]interface{}, error) {
	return s.get(fmt.Sprintf("checks/%s", check))
}