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

Function ParseDOidAsInt

pkg/sql/sem/tree/parse_string.go:138–145  ·  view source on GitHub ↗

ParseDOidAsInt parses the input and returns it as an OID. If the input is not formatted as an int, an error is returned.

(s string)

Source from the content-addressed store, hash-verified

136// ParseDOidAsInt parses the input and returns it as an OID. If the input
137// is not formatted as an int, an error is returned.
138func ParseDOidAsInt(s string) (*DOid, error) {
139 i, err := strconv.ParseInt(strings.TrimSpace(s), 0, 64)
140 if err != nil {
141 return nil, MakeParseError(s, types.Oid, err)
142 }
143 o, err := IntToOid(DInt(i))
144 return NewDOid(o), err
145}
146
147// FormatBitArrayToType formats bit arrays such that they fill the total width
148// if too short, or truncate if too long.

Callers 1

ParseAndRequireStringFunction · 0.85

Calls 4

MakeParseErrorFunction · 0.85
IntToOidFunction · 0.85
DIntTypeAlias · 0.85
NewDOidFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…