DecodeIfNull decodes a NULL value from the input buffer. If the input buffer contains a null 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 result. Since the NU
(b []byte)
| 844 | // safe to call DecodeIfNull on their encoded values. |
| 845 | // This function handles both ascendingly and descendingly encoded NULLs. |
| 846 | func DecodeIfNull(b []byte) ([]byte, bool) { |
| 847 | if PeekType(b) == Null { |
| 848 | return b[1:], true |
| 849 | } |
| 850 | return b, false |
| 851 | } |
| 852 | |
| 853 | // DecodeIfNotNull decodes a not-NULL value from the input buffer. If the input |
| 854 | // buffer contains a not-NULL marker at the start of the buffer then it is |
no test coverage detected
searching dependent graphs…