Search for usage in LXR

#include <KDbSqlString.h>

Public Member Functions

 KDbSqlString ()
 KDbSqlString (const char *s, quint64 len)
bool isEmpty () const
QByteArray rawDataToByteArray () const

Public Attributes

quint64 length
const char * string

Detailed Description

The KDbSqlString class abstracts low-level information about a single string value returned by KDbSqlRecord.

KDbSqlString exists for optimization purposes. KDbSqlRecord can return KDbSqlString objects to avoid premature converting to QString or QByteArray. This way memory allocations are not required.

Definition at line 32 of file KDbSqlString.h.

Constructor & Destructor Documentation

◆ KDbSqlString() [1/2]

KDbSqlString::KDbSqlString ( )

Creates an empty string object.

Definition at line 36 of file KDbSqlString.h.

◆ KDbSqlString() [2/2]

KDbSqlString::KDbSqlString ( const char *  s,
quint64  len 

Creates string object from raw string s, of specified length.

Definition at line 39 of file KDbSqlString.h.

Member Function Documentation

◆ isEmpty()

bool KDbSqlString::isEmpty ( ) const
true if this string value is empty. Here, NULL values are considered empty too.

Definition at line 42 of file KDbSqlString.h.

◆ rawDataToByteArray()

QByteArray KDbSqlString::rawDataToByteArray ( ) const
string value converted to bytea array For optimization, raw string data is used via, see QByteArray::fromRawData() for details. The caller must not delete data or modify the parent KDbSqlRecord object directly as long as the returned QByteArray exists.

Definition at line 48 of file KDbSqlString.h.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 04:08:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.