File tree Expand file tree Collapse file tree 2 files changed +35
-44
lines changed Expand file tree Collapse file tree 2 files changed +35
-44
lines changed Original file line number Diff line number Diff 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+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments