wxSQLite3  5.0.1
Loading...
Searching...
No Matches
wxSQLite3::Blob Class Reference

Represents a SQLite BLOB handle. More...

#include <wxsqlite3.h>

Public Member Functions

 Blob ()
 Constructor.
 Blob (DatabaseHandlePtr dbHandle, BlobHandlePtr blobHandle, bool writable)
 Constructor (internal use only)
 Blob (const Blob &)=default
Bloboperator= (const Blob &)=default
 Blob (Blob &&)=default
Bloboperator= (Blob &&)=default
virtual ~Blob ()
 Destructor.
wxMemoryBuffer & Read (wxMemoryBuffer &blobValue, int length, int offset) const
 Read partial BLOB value.
void Write (const wxMemoryBuffer &blobValue, int offset)
 Write partial BLOB value.
bool IsOk () const
 Check whether the BLOB handle is correctly initialized.
bool IsReadOnly () const
 Check whether the BLOB handle is read only.
int GetSize () const
 Get the size of the associated BLOB.
void Rebind (wxLongLong rowid)
 Rebind the associated BLOB to a new row.
void Finalize ()
 Finalize the BLOB.

Detailed Description

Represents a SQLite BLOB handle.

Constructor & Destructor Documentation

◆ Blob() [1/4]

wxSQLite3::Blob::Blob ( )

Constructor.

◆ Blob() [2/4]

wxSQLite3::Blob::Blob ( DatabaseHandlePtr dbHandle,
BlobHandlePtr blobHandle,
bool writable )

Constructor (internal use only)

◆ Blob() [3/4]

wxSQLite3::Blob::Blob ( const Blob & )
default

◆ Blob() [4/4]

wxSQLite3::Blob::Blob ( Blob && )
default

◆ ~Blob()

virtual wxSQLite3::Blob::~Blob ( )
virtual

Destructor.

Member Function Documentation

◆ Finalize()

void wxSQLite3::Blob::Finalize ( )

Finalize the BLOB.

◆ GetSize()

int wxSQLite3::Blob::GetSize ( ) const

Get the size of the associated BLOB.

Returns
the BLOB size

◆ IsOk()

bool wxSQLite3::Blob::IsOk ( ) const

Check whether the BLOB handle is correctly initialized.

Returns
TRUE if the BLOB handle is correctly initialized, FALSE otherwise

◆ IsReadOnly()

bool wxSQLite3::Blob::IsReadOnly ( ) const

Check whether the BLOB handle is read only.

Returns
TRUE if the BLOB handle is readonly, FALSE otherweis

◆ operator=() [1/2]

Blob & wxSQLite3::Blob::operator= ( Blob && )
default

◆ operator=() [2/2]

Blob & wxSQLite3::Blob::operator= ( const Blob & )
default

◆ Read()

wxMemoryBuffer & wxSQLite3::Blob::Read ( wxMemoryBuffer & blobValue,
int length,
int offset ) const

Read partial BLOB value.

Parameters
blobValuememory buffer receiving the partial content of the BLOB
lengthlength of BLOB content to be read
offsetoffset within BLOB where the read starts
Returns
the address of the memory buffer

◆ Rebind()

void wxSQLite3::Blob::Rebind ( wxLongLong rowid)

Rebind the associated BLOB to a new row.

Please refer to the SQLite documentation for further information (see function sqlite3_blob_reopen)

Parameters
rowidid of the row to which the BLOB should be rebound
Since
SQLite3 version 3.7.4

◆ Write()

void wxSQLite3::Blob::Write ( const wxMemoryBuffer & blobValue,
int offset )

Write partial BLOB value.

Parameters
blobValuememory buffer receiving the partial content of the BLOB
offsetoffset within BLOB where the read starts

The documentation for this class was generated from the following file: