MCPcopy Create free account
hub / github.com/dolthub/doltgresql / ParseDIPAddrFromINetString

Function ParseDIPAddrFromINetString

postgres/parser/sem/tree/datum.go:249–256  ·  view source on GitHub ↗

ParseDIPAddrFromINetString parses and returns the *DIPAddr Datum value represented by the provided input INet string, or an error.

(s string)

Source from the content-addressed store, hash-verified

247// ParseDIPAddrFromINetString parses and returns the *DIPAddr Datum value
248// represented by the provided input INet string, or an error.
249func ParseDIPAddrFromINetString(s string) (*DIPAddr, error) {
250 var d DIPAddr
251 err := ipaddr.ParseINet(s, &d.IPAddr)
252 if err != nil {
253 return nil, err
254 }
255 return &d, nil
256}
257
258// ResolvedType implements the TypedExpr interface.
259func (*DBool) ResolvedType() *types.T {

Callers 2

ParseAndRequireStringFunction · 0.85
SampleDatumFunction · 0.85

Calls 1

ParseINetFunction · 0.92

Tested by

no test coverage detected