package
19.1.0-rc.1+incompatible
Repository: https://github.com/dchenk/cockroach.git
Documentation: pkg.go.dev
# Packages
Package csv reads and writes comma-separated values (CSV) files.
# Functions
AddJSONPathTerminator adds a json path terminator to a byte array.
DecodeBitArrayAscending decodes a bit array which was encoded using EncodeBitArrayAscending.
DecodeBitArrayDescending is the descending version of DecodeBitArrayAscending.
DecodeBitArrayValue decodes a value encoded by EncodeUntaggedBitArrayValue.
DecodeBoolValue decodes a value encoded by EncodeBoolValue.
DecodeBytesAscending decodes a []byte value from the input buffer which was encoded using EncodeBytesAscending.
DecodeBytesDescending decodes a []byte value from the input buffer which was encoded using EncodeBytesDescending.
DecodeBytesValue decodes a value encoded by EncodeBytesValue.
DecodeDecimalAscending returns the remaining byte slice after decoding and the decoded decimal from buf.
DecodeDecimalDescending decodes decimals encoded with EncodeDecimalDescending.
DecodeDecimalValue decodes a value encoded by EncodeDecimalValue.
DecodeDurationAscending decodes a duration.Duration value which was encoded using EncodeDurationAscending.
DecodeDurationDescending is the descending version of DecodeDurationAscending.
DecodeDurationValue decodes a value encoded by EncodeUntaggedDurationValue.
DecodeFloatAscending returns the remaining byte slice after decoding and the decoded float64 from buf.
DecodeFloatDescending decodes floats encoded with EncodeFloatDescending.
DecodeFloatValue decodes a value encoded by EncodeFloatValue.
DecodeIfInterleavedSentinel decodes the interleavedSentinel from the input buffer and returns the remaining buffer without the sentinel if the interleavedSentinel is the first byte.
DecodeIfNotNull decodes a not-NULL value from the input buffer.
DecodeIfNotNullDescending decodes encodedNotNullDesc from the input buffer and returns the remaining buffer without the sentinel if encodedNotNullDesc is the first byte.
DecodeIfNull decodes a NULL value from the input buffer.
DecodeIntoNonsortingDecimal is like DecodeNonsortingDecimal, but it operates on the passed-in *apd.Decimal instead of producing a new one.
DecodeIntoUntaggedDecimalValue is like DecodeUntaggedDecimalValue except it writes the new Decimal into the input apd.Decimal pointer, which must be non-nil.
DecodeIntValue decodes a value encoded by EncodeIntValue.
DecodeIPAddrValue decodes a value encoded by EncodeIPAddrValue.
DecodeNonsortingDecimal returns the decoded decimal from buf encoded with EncodeNonsortingDecimal.
DecodeNonsortingStdlibUvarint decodes a value encoded with binary.PutUvarint.
DecodeNonsortingStdlibVarint decodes a value encoded by EncodeNonsortingVarint.
DecodeNonsortingUvarint decodes a value encoded by EncodeNonsortingUvarint.
DecodeTimeAscending decodes a time.Time value which was encoded using EncodeTime.
DecodeTimeDescending is the descending version of DecodeTimeAscending.
DecodeTimeValue decodes a value encoded by EncodeTimeValue.
DecodeUint32Ascending decodes a uint32 from the input buffer, treating the input as a big-endian 4 byte uint32 representation.
DecodeUint32Descending decodes a uint32 value which was encoded using EncodeUint32Descending.
DecodeUint64Ascending decodes a uint64 from the input buffer, treating the input as a big-endian 8 byte uint64 representation.
DecodeUint64Descending decodes a uint64 value which was encoded using EncodeUint64Descending.
DecodeUnsafeStringAscending decodes a string value from the input buffer which was encoded using EncodeString or EncodeBytes.
DecodeUnsafeStringDescending decodes a string value from the input buffer which was encoded using EncodeStringDescending or EncodeBytesDescending.
DecodeUntaggedBitArrayValue decodes a value encoded by EncodeUntaggedBitArrayValue.
DecodeUntaggedBytesValue decodes a value encoded by EncodeUntaggedBytesValue.
DecodeUntaggedDecimalValue decodes a value encoded by EncodeUntaggedDecimalValue.
DecodeUntaggedDurationValue decodes a value encoded by EncodeUntaggedDurationValue.
DecodeUntaggedFloatValue decodes a value encoded by EncodeUntaggedFloatValue.
DecodeUntaggedIntValue decodes a value encoded by EncodeUntaggedIntValue.
DecodeUntaggedIPAddrValue decodes a value encoded by EncodeUntaggedIPAddrValue.
DecodeUntaggedTimeValue decodes a value encoded by EncodeUntaggedTimeValue.
DecodeUntaggedUUIDValue decodes a value encoded by EncodeUntaggedUUIDValue.
DecodeUUIDValue decodes a value encoded by EncodeUUIDValue.
DecodeUvarintAscending decodes a varint encoded uint64 from the input buffer.
DecodeUvarintDescending decodes a uint64 value which was encoded using EncodeUvarintDescending.
DecodeValueTag decodes a value encoded by EncodeValueTag, used as a prefix in each of the other EncodeFooValue methods.
DecodeVarintAscending decodes a value encoded by EncodeVaringAscending.
DecodeVarintDescending decodes a uint64 value which was encoded using EncodeVarintDescending.
DecomposeKeyTokens breaks apart a key into its individual key-encoded values and returns a slice of byte slices, one for each key-encoded value.
EncLenUvarintAscending returns the encoding length for EncodeUvarintAscending without actually encoding.
EncLenUvarintDescending returns the encoding length for EncodeUvarintDescending without actually encoding.
EncodeArrayAscending encodes a value used to signify membership of an array for JSON objects.
EncodeArrayValue encodes a byte array value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeBitArrayAscending encodes a bitarray.BitArray value, appends it to the supplied buffer, and returns the final buffer.
EncodeBitArrayDescending is the descending version of EncodeBitArrayAscending.
EncodeBitArrayValue encodes a bit array value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeBoolValue encodes a bool value, appends it to the supplied buffer, and returns the final buffer.
EncodeBytesAscending encodes the []byte value using an escape-based encoding.
EncodeBytesDescending encodes the []byte value using an escape-based encoding and then inverts (ones complement) the result so that it sorts in reverse order, from larger to smaller lexicographically.
EncodeBytesValue encodes a byte array value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeDecimalAscending returns the resulting byte slice with the encoded decimal appended to the given buffer.
EncodeDecimalDescending is the descending version of EncodeDecimalAscending.
EncodeDecimalValue encodes an apd.Decimal value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeDurationAscending encodes a duration.Duration value, appends it to the supplied buffer, and returns the final buffer.
EncodeDurationDescending is the descending version of EncodeDurationAscending.
EncodeDurationValue encodes a duration.Duration value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeFalseAscending encodes the boolean value false for use with JSON inverted indexes.
EncodeFloatAscending returns the resulting byte slice with the encoded float64 appended to b.
EncodeFloatDescending is the descending version of EncodeFloatAscending.
EncodeFloatValue encodes a float value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeInterleavedSentinel encodes an interleavedSentinel that is necessary for interleaved indexes and their index keys.
EncodeIntValue encodes an int value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeIPAddrValue encodes a ipaddr.IPAddr value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeJSONAscending encodes a JSON Type.
EncodeJSONEmptyArray returns a byte array b with a byte to signify an empty JSON array.
EncodeJSONEmptyObject returns a byte array b with a byte to signify an empty JSON object.
EncodeJSONKeyStringAscending encodes the JSON key string value with a JSON specific escaped terminator.
EncodeJSONValue encodes an already-byte-encoded JSON value with no value tag but with a length prefix, appends it to the supplied buffer, and returns the final buffer.
EncodeNonsortingDecimal returns the resulting byte slice with the encoded decimal appended to b.
EncodeNonsortingStdlibVarint encodes an int value using encoding/binary, appends it to the supplied buffer, and returns the final buffer.
EncodeNonsortingUvarint encodes a uint64, appends it to the supplied buffer, and returns the final buffer.
EncodeNotNullAscending encodes a value that is larger than the NULL marker encoded by EncodeNull but less than any encoded value returned by EncodeVarint, EncodeFloat, EncodeBytes or EncodeString.
EncodeNotNullDescending is the descending equivalent of EncodeNotNullAscending.
EncodeNotNullValue encodes a not null value, appends it to the supplied buffer, and returns the final buffer.
EncodeNullAscending encodes a NULL value.
EncodeNullDescending is the descending equivalent of EncodeNullAscending.
EncodeNullValue encodes a null value, appends it to the supplied buffer, and returns the final buffer.
EncodeStringAscending encodes the string value using an escape-based encoding.
EncodeStringDescending is the descending version of EncodeStringAscending.
EncodeTimeAscending encodes a time value, appends it to the supplied buffer, and returns the final buffer.
EncodeTimeDescending is the descending version of EncodeTimeAscending.
EncodeTimeValue encodes a time.Time value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeTrueAscending encodes the boolean value true for use with JSON inverted indexes.
EncodeUint32Ascending encodes the uint32 value using a big-endian 4 byte representation.
EncodeUint32Descending encodes the uint32 value so that it sorts in reverse order, from largest to smallest.
EncodeUint64Ascending encodes the uint64 value using a big-endian 8 byte representation.
EncodeUint64Descending encodes the uint64 value so that it sorts in reverse order, from largest to smallest.
EncodeUntaggedBitArrayValue encodes a bit array value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedBytesValue encodes a byte array value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedDecimalValue encodes an apd.Decimal value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedDurationValue encodes a duration.Duration value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedFloatValue encodes a float value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedIntValue encodes an int value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedIPAddrValue encodes a ipaddr.IPAddr value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedTimeValue encodes a time.Time value, appends it to the supplied buffer, and returns the final buffer.
EncodeUntaggedUUIDValue encodes a uuid.UUID value, appends it to the supplied buffer, and returns the final buffer.
EncodeUUIDValue encodes a uuid.UUID value with its value tag, appends it to the supplied buffer, and returns the final buffer.
EncodeUvarintAscending encodes the uint64 value using a variable length (length-prefixed) representation.
EncodeUvarintDescending encodes the uint64 value so that it sorts in reverse order, from largest to smallest.
EncodeValueTag encodes the prefix that is used by each of the EncodeFooValue methods.
EncodeVarintAscending encodes the int64 value using a variable length (length-prefixed) representation.
EncodeVarintDescending encodes the int64 value so that it sorts in reverse order, from largest to smallest.
GetMultiVarintLen find the length of <num> encoded varints that follow a 1-byte tag.
PeekLength returns the length of the encoded value at the start of b.
PeekLengthNonsortingUvarint returns the length of the value that starts at the beginning of buf and was encoded by EncodeNonsortingUvarint.
PeekType peeks at the type of the value encoded at the start of b.
PeekValueLength returns the length of the encoded value at the start of b.
PeekValueLengthWithOffsetsAndType is the same as PeekValueLength, except it expects a dataOffset and typ value from a previous call to DecodeValueTag on its input byte slice.
PrettyPrintValue returns the string representation of all contiguous decodable values in the provided byte slice, separated by a provided separator.
PrettyPrintValueEncoded returns a string representation of the first decodable value in the provided byte slice, along with the remaining byte slice after decoding.
PrintableBytes returns true iff the given byte array is a valid UTF-8 sequence and it is printable.
PutUint32Ascending encodes the uint32 value using a big-endian 4 byte representation at the specified index, lengthening the input slice if necessary.
UndoPrefixEnd is a partial inverse for roachpb.Key.PrefixEnd.
UnsafeConvertStringToBytes converts a string to a byte array to be used with string encoding functions.
UpperBoundNonsortingDecimalSize returns the upper bound number of bytes that the decimal will need for the non-sorting encoding.
WordLen returns the size in bytes of the given array of Words.
# Constants
Type values.
Direction values.
Type values.
BitArray encoded descendingly.
Type values.
Bytes encoded descendingly.
BytesDescMarker is exported for testing.
Type values.
Direction values.
Type values.
3 varints are encoded.
Type values.
Type values.
Type values.
253.
128.
Type values.
Type values.
NoColumnID is a sentinel for the EncodeFooValue methods representing an invalid column id.
NonsortingUvarintMaxLen is the maximum length of an EncodeNonsortingUvarint encoded value.
NonsortingVarintMaxLen is the maximum length of an EncodeNonsortingVarint encoded value.
Type values.
Type values.
SentinelType is used for bit manipulation to check if the encoded type value requires more than 4 bits, and thus will be encoded in two bytes.
Type values.
Type values.
Type values.
Type values.
Type values.