Skip to content

Commit 9bd0e36

Browse files
committed
remove value_string.go
1 parent 2f5d118 commit 9bd0e36

File tree

2 files changed

+35
-44
lines changed

2 files changed

+35
-44
lines changed

internal/value/value.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,3 +1773,38 @@ func ZeroValue(t Type) *zeroValue {
17731773
t: t,
17741774
}
17751775
}
1776+
1777+
type stringValue []byte
1778+
1779+
func (v stringValue) toString(buffer *bytes.Buffer) {
1780+
a := allocator.New()
1781+
defer a.Free()
1782+
v.Type().toString(buffer)
1783+
valueToString(buffer, v.Type(), v.toYDB(a))
1784+
}
1785+
1786+
func (v stringValue) String() string {
1787+
buf := allocator.Buffers.Get()
1788+
defer allocator.Buffers.Put(buf)
1789+
v.toString(buf)
1790+
return buf.String()
1791+
}
1792+
1793+
func (stringValue) Type() Type {
1794+
return TypeString
1795+
}
1796+
1797+
func (v stringValue) toYDB(a *allocator.Allocator) *Ydb.Value {
1798+
vv := a.Bytes()
1799+
1800+
vv.BytesValue = v
1801+
1802+
vvv := a.Value()
1803+
vvv.Value = vv
1804+
1805+
return vvv
1806+
}
1807+
1808+
func StringValue(v []byte) stringValue {
1809+
return stringValue(v)
1810+
}

internal/value/value_string.go

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)