|
|
static DUCKDB_API idx_t | BitLength (bitstring_t bits) |
| | Returns the number of bits in the bit string.
|
| |
|
static DUCKDB_API idx_t | BitCount (bitstring_t bits) |
| | Returns the number of set bits in the bit string.
|
| |
|
static DUCKDB_API idx_t | OctetLength (bitstring_t bits) |
| | Returns the number of bytes in the bit string.
|
| |
|
static DUCKDB_API idx_t | GetBit (bitstring_t bit_string, idx_t n) |
| | Extracts the nth bit from bit string; the first (leftmost) bit is indexed 0.
|
| |
|
static DUCKDB_API void | SetBit (bitstring_t &bit_string, idx_t n, idx_t new_value) |
| | Sets the nth bit in bit string to newvalue; the first (leftmost) bit is indexed 0.
|
| |
|
static DUCKDB_API idx_t | BitPosition (bitstring_t substring, bitstring_t bits) |
| | Returns first starting index of the specified substring within bits, or zero if it's not present.
|
| |
| static DUCKDB_API void | ToString (bitstring_t bits, char *output) |
| |
|
static DUCKDB_API string | ToString (bitstring_t bits) |
| |
|
static DUCKDB_API bool | TryGetBitStringSize (string_t str, idx_t &result_size, string *error_message) |
| | Returns the bit size of a string -> bit conversion.
|
| |
| static DUCKDB_API void | ToBit (string_t str, bitstring_t &output) |
| |
|
static DUCKDB_API string | ToBit (string_t str) |
| |
|
static DUCKDB_API void | BlobToBit (string_t blob, bitstring_t &output) |
| | output needs to have enough space allocated before calling this function (blob size + 1)
|
| |
|
static DUCKDB_API string | BlobToBit (string_t blob) |
| |
| template<class T > |
| static void | NumericToBit (T numeric, bitstring_t &output_str) |
| | output_str needs to have enough space allocated before calling this function (sizeof(T) + 1)
|
| |
| template<class T > |
| static string | NumericToBit (T numeric) |
| |
| template<class T > |
| static void | BitToNumeric (bitstring_t bit, T &output_num) |
| | bit is expected to fit inside of output num (bit size <= sizeof(T) + 1)
|
| |
| template<class T > |
| static T | BitToNumeric (bitstring_t bit) |
| |
|
static void | BitToBlob (bitstring_t bit, string_t &output_blob) |
| | bit is expected to fit inside of output_blob (bit size = output_blob + 1)
|
| |
|
static string | BitToBlob (bitstring_t bit) |
| |
|
static DUCKDB_API void | BitString (const string_t &input, idx_t len, bitstring_t &result) |
| | Creates a new bitstring of determined length.
|
| |
|
static DUCKDB_API void | ExtendBitString (const bitstring_t &input, idx_t bit_length, bitstring_t &result) |
| |
|
static DUCKDB_API void | SetEmptyBitString (bitstring_t &target, string_t &input) |
| |
|
static DUCKDB_API void | SetEmptyBitString (bitstring_t &target, idx_t len) |
| |
|
static DUCKDB_API idx_t | ComputeBitstringLen (idx_t len) |
| |
|
static DUCKDB_API void | RightShift (const bitstring_t &bit_string, idx_t shift, bitstring_t &result) |
| |
|
static DUCKDB_API void | LeftShift (const bitstring_t &bit_string, idx_t shift, bitstring_t &result) |
| |
|
static DUCKDB_API void | BitwiseAnd (const bitstring_t &rhs, const bitstring_t &lhs, bitstring_t &result) |
| |
|
static DUCKDB_API void | BitwiseOr (const bitstring_t &rhs, const bitstring_t &lhs, bitstring_t &result) |
| |
|
static DUCKDB_API void | BitwiseXor (const bitstring_t &rhs, const bitstring_t &lhs, bitstring_t &result) |
| |
|
static DUCKDB_API void | BitwiseNot (const bitstring_t &rhs, bitstring_t &result) |
| |
|
static DUCKDB_API void | Verify (const bitstring_t &input) |
| |
The Bit class is a static class that holds helper functions for the BIT type.