MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / ParseDIPAddrFromINetString

Function ParseDIPAddrFromINetString

pkg/sql/sem/tree/datum.go:351–358  ·  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

349// ParseDIPAddrFromINetString parses and returns the *DIPAddr Datum value
350// represented by the provided input INet string, or an error.
351func ParseDIPAddrFromINetString(s string) (*DIPAddr, error) {
352 var d DIPAddr
353 err := ipaddr.ParseINet(s, &d.IPAddr)
354 if err != nil {
355 return nil, err
356 }
357 return &d, nil
358}
359
360// GetBool gets DBool or an error (also treats NULL as false, not an error).
361func GetBool(d Datum) (DBool, error) {

Callers 3

ParseAndRequireStringFunction · 0.85
PerformCastFunction · 0.85
SampleDatumFunction · 0.85

Calls 1

ParseINetFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…