Akonadi::Server::SchemaVersion

Akonadi::Server::SchemaVersion Class Reference

#include <entities.h>

Inherits Entity.

Public Types

typedef QVector< SchemaVersionList
 

Public Member Functions

 SchemaVersion (int version, int generation)
 
 SchemaVersion (const SchemaVersion &other)
 
int generation () const
 
bool hasPendingChanges () const
 
bool insert (qint64 *insertId=nullptr)
 
void invalidateCache () const
 
SchemaVersionoperator= (const SchemaVersion &other)
 
bool operator== (const SchemaVersion &other) const
 
void setGeneration (int generation)
 
void setVersion (int version)
 
bool update ()
 
int version () const
 

Static Public Member Functions

static QStringList columnNames ()
 
static int count (const QString &column, const QVariant &value)
 
static void enableCache (bool enable)
 
static QVector< SchemaVersionextractResult (QSqlQuery &query)
 
static QStringList fullColumnNames ()
 
static QString generationColumn ()
 
static QString generationFullColumnName ()
 
static void invalidateCompleteCache ()
 
static bool remove (const QString &column, const QVariant &value)
 
static SchemaVersion::List retrieveAll ()
 
static SchemaVersion::List retrieveFiltered (const QString &key, const QVariant &value)
 
static QString tableName ()
 
static QString versionColumn ()
 
static QString versionFullColumnName ()
 

Detailed Description

Representation of a record in the SchemaVersion table.


Contains the schema version of the database. This class is implicitly shared.

Definition at line 77 of file entities.h.

Member Typedef Documentation

List of SchemaVersion records.

Definition at line 83 of file entities.h.

Member Function Documentation

QStringList SchemaVersion::columnNames ( )
static

Returns a list of all SQL column names.

The names are in the correct order for usage with extractResult().

Definition at line 165 of file entities.cpp.

int SchemaVersion::count ( const QString column,
const QVariant value 
)
static

Count records with value value in column column.

Definition at line 213 of file entities.cpp.

void SchemaVersion::enableCache ( bool  enable)
static

Enable/disable caching for this table.

This method is not thread-safe, call before activating multi-threading.

Definition at line 416 of file entities.cpp.

QVector< SchemaVersion > SchemaVersion::extractResult ( QSqlQuery query)
static

Extracts the query result.

Parameters
queryA executed query containing a list of SchemaVersion records. Note that the fields need to be in the correct order (same as in the constructor)!

Definition at line 223 of file entities.cpp.

QStringList SchemaVersion::fullColumnNames ( )
static

Returns a list of all SQL column names prefixed with their tables names.

The names are in the correct order for usage with extractResult().

Definition at line 175 of file entities.cpp.

int SchemaVersion::generation ( ) const

Returns the value of the generation column of this record.

Definition at line 143 of file entities.cpp.

bool SchemaVersion::hasPendingChanges ( ) const

Returns true if this record has any pending changes.

Definition at line 347 of file entities.cpp.

bool SchemaVersion::insert ( qint64 *  insertId = nullptr)

Inserts this record into the DataStore.

Parameters
insertIdpointer to an int, filled with the identifier of this record on success.

Definition at line 312 of file entities.cpp.

void SchemaVersion::invalidateCache ( ) const

Invalidates the cache entry for this record.

This method has no effect if caching is not enabled for this table.

Definition at line 400 of file entities.cpp.

void SchemaVersion::invalidateCompleteCache ( )
static

Invalidates all cache entries for this table.

This method has no effect if caching is not enabled for this table.

Definition at line 408 of file entities.cpp.

SchemaVersion & SchemaVersion::operator= ( const SchemaVersion other)

assignment operator

Definition at line 114 of file entities.cpp.

bool SchemaVersion::operator== ( const SchemaVersion other) const

comparisson operator, compares ids, not content

Definition at line 124 of file entities.cpp.

QVector< SchemaVersion > SchemaVersion::retrieveAll ( )
static

Retrieve all records from this table.

Definition at line 247 of file entities.cpp.

QVector< SchemaVersion > SchemaVersion::retrieveFiltered ( const QString key,
const QVariant value 
)
static

Retrieve all records with value value in column key.

Definition at line 264 of file entities.cpp.

void SchemaVersion::setGeneration ( int  generation)

Sets the value of the generation column of this record.

Definition at line 149 of file entities.cpp.

void SchemaVersion::setVersion ( int  version)

Sets the value of the version column of this record.

Definition at line 136 of file entities.cpp.

QString SchemaVersion::tableName ( )
static

Returns the name of the SQL table.

Definition at line 159 of file entities.cpp.

bool SchemaVersion::update ( )

Stores all changes made to this record into the database.

Note that this method assumes the existence of an 'id' column to identify the record to update. If that column does not exist, all records will be changed.

Returns
true on success, false otherwise.

Definition at line 358 of file entities.cpp.

int SchemaVersion::version ( ) const

Returns the value of the version column of this record.

Definition at line 130 of file entities.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 31 2020 22:46:26 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.