// PgGetMultixactMembers calls the stored procedure 'pg_catalog.pg_get_multixact_members(xid) SETOF record' on db.
190891
func PgGetMultixactMembers(db XODB, v0 pgtypes.Xid) ([]pgtypes.Record, error) {
	var err error

	// sql query
	const sqlstr = `SELECT pg_catalog.pg_get_multixact_members($1)`

	// run query
	var ret []pgtypes.Record
	XOLog(sqlstr, v0)
	err = db.QueryRow(sqlstr, v0).Scan(&ret)
	if err != nil {
		return nil, err
	}

	return ret, nil
}
32990
func (t *Template) GetAWSGuardDutyMemberWithName(name string) (*resources.AWSGuardDutyMember, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSGuardDutyMember:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSGuardDutyMember not found", name)
}
1331767
func (c *Card) GetMembers(args Arguments) (members []*Member, err error) {
	path := fmt.Sprintf("cards/%s/members", c.ID)
	err = c.client.Get(path, args, &members)
	for i := range members {
		members[i].client = c.client
	}
	return
}
166335
func (b *BigIP) GetPoolMember(pool string, member string) (*PoolMember, error) {
	var poolMember PoolMember
	err, ok := b.getForEntity(&poolMember, uriLtm, uriPool, pool, uriPoolMember, member)

	if err != nil {
		return nil, err
	}
	if !ok {
		return nil, nil
	}

	return &poolMember, nil
}
789034
func (n *NetworkServerAPI) GetMulticastGroup(ctx context.Context, req *ns.GetMulticastGroupRequest) (*ns.GetMulticastGroupResponse, error) {
	var mgID uuid.UUID
	copy(mgID[:], req.Id)

	mg, err := storage.GetMulticastGroup(storage.DB(), mgID, false)
	if err != nil {
		return nil, errToRPCError(err)
	}

	resp := ns.GetMulticastGroupResponse{
		MulticastGroup: &ns.MulticastGroup{
			Id:               mg.ID.Bytes(),
			McAddr:           mg.MCAddr[:],
			McNwkSKey:        mg.MCNwkSKey[:],
			FCnt:             mg.FCnt,
			Dr:               uint32(mg.DR),
			Frequency:        uint32(mg.Frequency),
			PingSlotPeriod:   uint32(mg.PingSlotPeriod),
			ServiceProfileId: mg.ServiceProfileID.Bytes(),
			RoutingProfileId: mg.RoutingProfileID.Bytes(),
		},
	}

	switch mg.GroupType {
	case storage.MulticastGroupB:
		resp.MulticastGroup.GroupType = ns.MulticastGroupType_CLASS_B
	case storage.MulticastGroupC:
		resp.MulticastGroup.GroupType = ns.MulticastGroupType_CLASS_C
	default:
		return nil, grpc.Errorf(codes.Internal, "invalid group-type: %s", mg.GroupType)
	}

	resp.CreatedAt, err = ptypes.TimestampProto(mg.CreatedAt)
	if err != nil {
		return nil, errToRPCError(err)
	}

	resp.UpdatedAt, err = ptypes.TimestampProto(mg.UpdatedAt)
	if err != nil {
		return nil, errToRPCError(err)
	}

	return &resp, nil
}
511728
func (api *Client) GetUserGroupsContext(ctx context.Context, options ...GetUserGroupsOption) ([]UserGroup, error) {
	params := GetUserGroupsParams{}

	for _, opt := range options {
		opt(&params)
	}

	values := url.Values{
		"token": {api.token},
	}
	if params.IncludeCount {
		values.Add("include_count", "true")
	}
	if params.IncludeDisabled {
		values.Add("include_disabled", "true")
	}
	if params.IncludeUsers {
		values.Add("include_users", "true")
	}

	response, err := api.userGroupRequest(ctx, "usergroups.list", values)
	if err != nil {
		return nil, err
	}
	return response.UserGroups, nil
}
757379
func Xidsend(db XODB, v0 pgtypes.Xid) ([]byte, error) {
	var err error

	// sql query
	const sqlstr = `SELECT pg_catalog.xidsend($1)`

	// run query
	var ret []byte
	XOLog(sqlstr, v0)
	err = db.QueryRow(sqlstr, v0).Scan(&ret)
	if err != nil {
		return nil, err
	}

	return ret, nil
}
634773
func (api *API) AccountMember(accountID string, memberID string) (AccountMember, error) {
	if accountID == "" {
		return AccountMember{}, errors.New(errMissingAccountID)
	}

	uri := fmt.Sprintf(
		"/accounts/%s/members/%s",
		accountID,
		memberID,
	)

	res, err := api.makeRequest("GET", uri, nil)
	if err != nil {
		return AccountMember{}, errors.Wrap(err, errMakeRequestError)
	}

	var accountMemberResponse AccountMemberDetailResponse
	err = json.Unmarshal(res, &accountMemberResponse)
	if err != nil {
		return AccountMember{}, errors.Wrap(err, errUnmarshalError)
	}

	return accountMemberResponse.Result, nil
}
276312
func (c *Cluster) GetMember(id uint64) *Member {
	c.mu.RLock()
	defer c.mu.RUnlock()
	return c.members[id]
}
961698
func NewGetMembershipReport(StartDate string, TeamSize []uint64, PendingInvites []uint64, MembersJoined []uint64, SuspendedMembers []uint64, Licenses []uint64) *GetMembershipReport {
	s := new(GetMembershipReport)
	s.StartDate = StartDate
	s.TeamSize = TeamSize
	s.PendingInvites = PendingInvites
	s.MembersJoined = MembersJoined
	s.SuspendedMembers = SuspendedMembers
	s.Licenses = Licenses
	return s
}
255909
func (c *Card) GetMemberDurations() (durations []*MemberDuration, err error) {
	var actions ActionCollection
	if len(c.Actions) == 0 {
		c.client.log("[trello] GetMemberDurations() called on card '%s' without any Card.Actions. Fetching fresh.", c.ID)
		actions, err = c.GetMembershipChangeActions()
		if err != nil {
			err = errors.Wrap(err, "GetMembershipChangeActions() call failed.")
			return
		}
	} else {
		actions = c.Actions.FilterToCardMembershipChangeActions()
	}

	return actions.GetMemberDurations()
}
39183
func PgXactCommitTimestamp(db XODB, v0 pgtypes.Xid) (time.Time, error) {
	var err error

	// sql query
	const sqlstr = `SELECT pg_catalog.pg_xact_commit_timestamp($1)`

	// run query
	var ret time.Time
	XOLog(sqlstr, v0)
	err = db.QueryRow(sqlstr, v0).Scan(&ret)
	if err != nil {
		return time.Time{}, err
	}

	return ret, nil
}
19155
func (prj *Project) NumericMembers() (members []uint64) {
	Db().Model(ProjectMember{}).Where(ProjectMember{To: prj.ID()}).Pluck(`"from"`, &members)
	return
}
578540
func (j TableJoin) GetJoinExpression() string {
	return fmt.Sprintf(`LEFT JOIN %s "%s" ON %s`, j.TableName, j.TableAlias, j.On)
}
453751
func (c *Client) SearchMembers(query string, args Arguments) (members []*Member, err error) {
	args["query"] = query
	err = c.Get("search/members", args, &members)
	return
}
1209939
func (b *Board) GetMembers(args Arguments) (members []*Member, err error) {
	path := fmt.Sprintf("boards/%s/members", b.ID)
	err = b.client.Get(path, args, &members)
	for i := range members {
		members[i].client = b.client
	}
	return
}
1363496
func (o *Organization) GetMembers(args Arguments) (members []*Member, err error) {
	path := fmt.Sprintf("organizations/%s/members", o.ID)
	err = o.client.Get(path, args, &members)
	for i := range members {
		members[i].client = o.client
	}
	return
}