C++ SDK Documentation
24.2.0
|
Representation of a String in Vertica. All character data is internally encoded as UTF-8 characters and is not NULL terminated. More...
Public Member Functions | |
VString (const VString &other) | |
void | alloc (vsize len) |
Allocate the VString's internal buffer and initialize to 'len' 0 bytes. More... | |
int | compare (const VString *other) const |
Compares this VString to another. More... | |
void | copy (const char *s, vsize len) |
Copy character data from C string to the VString's internal buffer. More... | |
void | copy (const char *s) |
Copy character data from null terminated C string to the VString's internal buffer. More... | |
void | copy (const std::string &s) |
Copy character data from std::string. More... | |
void | copy (const VString *from) |
Copy data from another VString. More... | |
void | copy (const VString &from) |
Copy data from another VString. More... | |
const char * | data () const |
Provides a read-only pointer to this VString's internal data. More... | |
char * | data () |
Provides a writeable pointer to this VString's internal data. More... | |
int | equal (const VString *other) const |
Indicates whether some other VString is equal to this one. More... | |
bool | isNull () const |
Indicates if this VString contains the SQL NULL value. More... | |
vsize | length () const |
Returns the length of this VString. More... | |
bool | operator< (const VString &other) const |
bool | operator<= (const VString &other) const |
VString & | operator= (const char *s) |
template<typename stringtype > | |
VString & | operator= (const stringtype &s) |
VString & | operator= (const VString &other) |
bool | operator== (const VString &other) const |
bool | operator> (const VString &other) const |
bool | operator>= (const VString &other) const |
void | setNull () |
Sets this VString to the SQL NULL value. | |
template<typename stringtype = std::string> | |
stringtype | str () const |
Provides a copy of this VString's data as a std::string. More... | |
Representation of a String in Vertica. All character data is internally encoded as UTF-8 characters and is not NULL terminated.
|
inline |
|
inline |
Compares this VString to another.
|
inline |
Copy character data from C string to the VString's internal buffer.
Data is copied from s into this VString. It is the caller's responsibility to not provide a value of 'len' that is larger than the maximum size of this VString
s | character input data |
len | length in bytes, not including the terminating null character |
Referenced by copy(), and operator=().
|
inline |
|
inline |
Copy character data from std::string.
s | null-terminated character input data |
Referenced by copy().
|
inline |
|
inline |
|
inline |
|
inline |
Provides a writeable pointer to this VString's internal data.
|
inline |
Indicates whether some other VString is equal to this one.
|
inline |
Indicates if this VString contains the SQL NULL value.
Referenced by copy(), Vertica::BlockReader::isNull(), Vertica::ValueRangeReader::isNull(), and str().
|
inline |
|
inline |
Set this object to have the contents of any string object
Copy this object to have the same contents of another VString
|
inline |
Provides a copy of this VString's data as a std::string.
Referenced by Vertica::operator+().