MCPcopy
hub / github.com/segmentio/ksuid / Value

Method Value

ksuid.go:139–144  ·  view source on GitHub ↗

Value converts the KSUID into a SQL driver value which can be used to directly use the KSUID as parameter to a SQL query.

()

Source from the content-addressed store, hash-verified

137// Value converts the KSUID into a SQL driver value which can be used to
138// directly use the KSUID as parameter to a SQL query.
139func (i KSUID) Value() (driver.Value, error) {
140 if i.IsNil() {
141 return nil, nil
142 }
143 return i.String(), nil
144}
145
146// Scan implements the sql.Scanner interface. It supports converting from
147// string, []byte, or nil into a KSUID value. Attempting to convert from

Callers 2

TestSqlValuerFunction · 0.80
TestSqlValuerNilValueFunction · 0.80

Calls 2

IsNilMethod · 0.95
StringMethod · 0.95

Tested by 2

TestSqlValuerFunction · 0.64
TestSqlValuerNilValueFunction · 0.64