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

Function ParseDIPAddrFromINetString

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

398// ParseDIPAddrFromINetString parses and returns the *DIPAddr Datum value
399// represented by the provided input INet string, or an error.
400func ParseDIPAddrFromINetString(s string) (*DIPAddr, error) {
401 var d DIPAddr
402 err := ipaddr.ParseINet(s, &d.IPAddr)
403 if err != nil {
404 return nil, err
405 }
406 return &d, nil
407}
408
409// GetBool gets DBool or an error (also treats NULL as false, not an error).
410func GetBool(d Datum) (DBool, error) {

Callers 2

ParseAndRequireStringFunction · 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…