// PointSend calls the stored procedure 'pg_catalog.point_send(point) bytea' on db.
540263
func PointSend(db XODB, v0 pgtypes.Point) ([]byte, error) {
	var err error

	// sql query
	const sqlstr = `SELECT pg_catalog.point_send($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
}
1000258
func (e *Engine) WritePoints(points []models.Point) error {
	values := make(map[string][]Value, len(points))
	var (
		keyBuf  []byte
		baseLen int
	)

	for _, p := range points {
		keyBuf = append(keyBuf[:0], p.Key()...)
		keyBuf = append(keyBuf, keyFieldSeparator...)
		baseLen = len(keyBuf)
		iter := p.FieldIterator()
		t := p.Time().UnixNano()
		for iter.Next() {
			keyBuf = append(keyBuf[:baseLen], iter.FieldKey()...)

			var v Value
			switch iter.Type() {
			case models.Float:
				fv, err := iter.FloatValue()
				if err != nil {
					return err
				}
				v = NewFloatValue(t, fv)
			case models.Integer:
				iv, err := iter.IntegerValue()
				if err != nil {
					return err
				}
				v = NewIntegerValue(t, iv)
			case models.Unsigned:
				iv, err := iter.UnsignedValue()
				if err != nil {
					return err
				}
				v = NewUnsignedValue(t, iv)
			case models.String:
				v = NewStringValue(t, iter.StringValue())
			case models.Boolean:
				bv, err := iter.BooleanValue()
				if err != nil {
					return err
				}
				v = NewBooleanValue(t, bv)
			default:
				return fmt.Errorf("unknown field type for %s: %s", string(iter.FieldKey()), p.String())
			}
			values[string(keyBuf)] = append(values[string(keyBuf)], v)
		}
	}

	e.mu.RLock()
	defer e.mu.RUnlock()

	// first try to write to the cache
	if err := e.Cache.WriteMulti(values); err != nil {
		return err
	}

	// Then make the write durable in the cache.
	if _, err := e.WAL.WriteMulti(values); err != nil {
		return err
	}

	return nil
}
599446
func Tidsend(db XODB, v0 pgtypes.Tid) ([]byte, error) {
	var err error

	// sql query
	const sqlstr = `SELECT pg_catalog.tidsend($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
}
1174830
func WriteEndpoint(keys []*lxcmap.EndpointKey, pm *policymap.PolicyMap) error {
	return writeEndpoint(keys, pm.GetFd())
}
1124810
func (s *ModifyDBClusterEndpointOutput) SetEndpointType(v string) *ModifyDBClusterEndpointOutput {
	s.EndpointType = &v
	return s
}
165864
func (uvm *UtilityVM) AddEndpointsToNS(id string, endpoints []*hns.HNSEndpoint) (err error) {
	op := "uvm::AddEndpointsToNS"
	log := logrus.WithFields(logrus.Fields{
		logfields.UVMID: uvm.id,
		"netns-id":      id,
	})
	log.Debug(op + " - Begin Operation")
	defer func() {
		if err != nil {
			log.Data[logrus.ErrorKey] = err
			log.Error(op + " - End Operation - Error")
		} else {
			log.Debug(op + " - End Operation - Success")
		}
	}()

	uvm.m.Lock()
	defer uvm.m.Unlock()

	ns, ok := uvm.namespaces[id]
	if !ok {
		return ErrNetNSNotFound
	}

	for _, endpoint := range endpoints {
		if _, ok := ns.nics[endpoint.Id]; !ok {
			nicID := guid.New()
			if err := uvm.addNIC(nicID, endpoint); err != nil {
				return err
			}
			ns.nics[endpoint.Id] = &nicInfo{
				ID:       nicID,
				Endpoint: endpoint,
			}
		}
	}
	return nil
}
908969
func (a *GetPossibleBreakpointsArgs) SetEnd(end Location) *GetPossibleBreakpointsArgs {
	a.End = &end
	return a
}
724319
func GenerateEndpoint() (string, error) {
	addr, err := net.ResolveTCPAddr("tcp", "localhost:0")
	if err != nil {
		return "", nil
	}

	l, err := net.ListenTCP("tcp", addr)
	if err != nil {
		return "", err
	}

	defer l.Close()
	return fmt.Sprintf("tcp://127.0.0.1:%d", l.Addr().(*net.TCPAddr).Port), nil
}
882140
func (a *AuthorizeEndpointHandlers) Append(h AuthorizeEndpointHandler) {
	for _, this := range *a {
		if reflect.TypeOf(this) == reflect.TypeOf(h) {
			return
		}
	}

	*a = append(*a, h)
}
990099
func (s *TestConnectionInput) SetEndpointArn(v string) *TestConnectionInput {
	s.EndpointArn = &v
	return s
}
994689
func (s *DescribeRefreshSchemasStatusInput) SetEndpointArn(v string) *DescribeRefreshSchemasStatusInput {
	s.EndpointArn = &v
	return s
}
69301
func encodeDBPointer(buf *bytes.Buffer, path, name string,
	val DBPointer) error {

	if len(val.ObjectId) != 12 {
		return fmt.Errorf("%v, DBPointer must be 12 bytes.", path)
	}

	// type
	if err := buf.WriteByte(_DBPOINTER); err != nil {
		return err
	}

	// name
	if err := writeCstring(buf, name); err != nil {
		return err
	}

	// Name
	if err := writeString(buf, val.Name); err != nil {
		return err
	}

	// ObjectId
	if _, err := buf.Write(val.ObjectId); err != nil {
		return err
	}

	return nil
}
964808
func WithEndpointAttributes(attrs ...trace.Attribute) EndpointOption {
	return func(o *EndpointOptions) {
		o.Attributes = attrs
	}
}
1270062
func (s *EnvironmentDescription) SetEndpointURL(v string) *EnvironmentDescription {
	s.EndpointURL = &v
	return s
}
373007
func (a *api) GetEndpoints(serviceID string, reportImports, reportExports, validate bool) ([]applicationendpoint.EndpointReport, error) {
	client, err := a.connectMaster()
	if err != nil {
		return nil, err
	}

	serviceIDs := make([]string, 0)
	serviceIDs = append(serviceIDs, serviceID)
	if endpoints, err := client.GetServiceEndpoints(serviceIDs, reportImports, reportExports, validate); err != nil {
		return nil, err
	} else {
		return endpoints, nil
	}
}
996598
func (s *ShapeIndexIterator) End() {
	s.position = len(s.index.cells)
	s.refresh()
}
611194
func (b ConnectionStringBuilder) WithEndpoint(endpoint string) ConnectionStringBuilder {
	b.endpoint = endpoint
	return b
}