MCPcopy Create free account
hub / github.com/dinedal/textql / EncodeSql

Method EncodeSql

sqlparser/sqltypes/sqltypes.go:130–138  ·  view source on GitHub ↗

EncodeSql encodes the value into an SQL statement. Can be binary.

(b BinWriter)

Source from the content-addressed store, hash-verified

128
129// EncodeSql encodes the value into an SQL statement. Can be binary.
130func (v Value) EncodeSql(b BinWriter) {
131 if v.Inner == nil {
132 if _, err := b.Write(nullstr); err != nil {
133 panic(err)
134 }
135 } else {
136 v.Inner.encodeSql(b)
137 }
138}
139
140// EncodeAscii encodes the value using 7-bit clean ascii bytes.
141func (v Value) EncodeAscii(b BinWriter) {

Callers 6

TestNullFunction · 0.95
TestNumericFunction · 0.95
TestStringFunction · 0.95
FormatMethod · 0.80
EncodeValueFunction · 0.80
TestTimeFunction · 0.80

Calls 2

WriteMethod · 0.80
encodeSqlMethod · 0.65

Tested by 4

TestNullFunction · 0.76
TestNumericFunction · 0.76
TestStringFunction · 0.76
TestTimeFunction · 0.64