KDbSqlString

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 ( )
inline

Creates an empty string object.

Definition at line 36 of file KDbSqlString.h.

◆ KDbSqlString() [2/2]

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

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
inline
Returns
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
inline
Returns
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.

Member Data Documentation

◆ length

quint64 KDbSqlString::length

Definition at line 51 of file KDbSqlString.h.

◆ string

const char* KDbSqlString::string

Definition at line 50 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 Mon Nov 4 2024 16:38:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.