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)
| 859 | // distinguish not-NULL from the empty string. |
| 860 | // This function handles both ascendingly and descendingly encoded NULLs. |
| 861 | func DecodeIfNotNull(b []byte) ([]byte, bool) { |
| 862 | if PeekType(b) == NotNull { |
| 863 | return b[1:], true |
| 864 | } |
| 865 | return b, false |
| 866 | } |
| 867 | |
| 868 | // DecodeIfNotNullDescending decodes encodedNotNullDesc from the input buffer |
| 869 | // and returns the remaining buffer without the sentinel if encodedNotNullDesc |
no test coverage detected
searching dependent graphs…