DecodeIfNotNull decodes a not-NULL value from the input buffer. If the input buffer contains a not-NULL marker at the start of the buffer then it is removed from the buffer and true is returned for the second result. Otherwise, the buffer is returned unchanged and false is returned for the second re
(b []byte)
| 1195 | // distinguish not-NULL from the empty string. |
| 1196 | // This function handles both ascendingly and descendingly encoded NULLs. |
| 1197 | func DecodeIfNotNull(b []byte) ([]byte, bool) { |
| 1198 | if PeekType(b) == NotNull { |
| 1199 | return b[1:], true |
| 1200 | } |
| 1201 | return b, false |
| 1202 | } |
| 1203 | |
| 1204 | // EncodeTimeAscending encodes a time value, appends it to the supplied buffer, |
| 1205 | // and returns the final buffer. The encoding is guaranteed to be ordered |
no test coverage detected
searching dependent graphs…