MyMoneyStorageSql Class Reference

#include <mymoneystoragesql.h>

Inheritance diagram for MyMoneyStorageSql:

IMyMoneyStorageFormat QSqlDatabase KShared
Collaboration diagram for MyMoneyStorageSql:

Collaboration graph

List of all members.

Public Member Functions

 MyMoneyStorageSql (IMyMoneySerialize *storage, const KURL &=KURL())
virtual ~MyMoneyStorageSql ()
unsigned int currentVersion () const
int open (const KURL &url, int openMode, bool clear=false)
void close (bool logoff=true)
bool readFile (void)
bool writeFile (void)
bool isDb2 () const
bool isInterbase () const
bool isMysql () const
bool isOracle8 () const
bool isODBC3 () const
bool isPostgresql () const
bool isSybase () const
bool isSqlite3 () const
const QString & lastError () const
virtual void fillStorage ()
void modifyUserInfo (const MyMoneyPayee &payee)
void addInstitution (const MyMoneyInstitution &inst)
void modifyInstitution (const MyMoneyInstitution &inst)
void removeInstitution (const MyMoneyInstitution &inst)
void addPayee (const MyMoneyPayee &payee)
void modifyPayee (const MyMoneyPayee &payee)
void removePayee (const MyMoneyPayee &payee)
void addAccount (const MyMoneyAccount &acc)
void modifyAccount (const MyMoneyAccount &acc)
void removeAccount (const MyMoneyAccount &acc)
void addTransaction (const MyMoneyTransaction &tx)
void modifyTransaction (const MyMoneyTransaction &tx)
void removeTransaction (const MyMoneyTransaction &tx)
void addSchedule (const MyMoneySchedule &sch)
void modifySchedule (const MyMoneySchedule &sch)
void removeSchedule (const MyMoneySchedule &sch)
void addSecurity (const MyMoneySecurity &sec)
void modifySecurity (const MyMoneySecurity &sec)
void removeSecurity (const MyMoneySecurity &sec)
void addPrice (const MyMoneyPrice &p)
void removePrice (const MyMoneyPrice &p)
void addCurrency (const MyMoneySecurity &sec)
void modifyCurrency (const MyMoneySecurity &sec)
void removeCurrency (const MyMoneySecurity &sec)
void addReport (const MyMoneyReport &rep)
void modifyReport (const MyMoneyReport &rep)
void removeReport (const MyMoneyReport &rep)
void addBudget (const MyMoneyBudget &bud)
void modifyBudget (const MyMoneyBudget &bud)
void removeBudget (const MyMoneyBudget &bud)
unsigned long transactionCount (const QString &aid=QString()) const
const QMap< QString, unsigned
long > 
transactionCountMap () const
const QMap< QString,
fetchAccounts (const QStringList &idList=QStringList(), bool forUpdate=false) const
const QMap< QString, MyMoneyMoneyfetchBalance (const QStringList &id, const QDate &date) const
const QMap< QString,
fetchBudgets (const QStringList &idList=QStringList(), bool forUpdate=false) const
const QMap< QString,
fetchCurrencies (const QStringList &idList=QStringList(), bool forUpdate=false) const
const QMap< QString,
fetchInstitutions (const QStringList &idList=QStringList(), bool forUpdate=false) const
const QMap< QString, MyMoneyPayeefetchPayees (const QStringList &idList=QStringList(), bool forUpdate=false) const
const MyMoneyPriceList fetchPrices (const QStringList &fromIdList=QStringList(), const QStringList &toIdList=QStringList(), bool forUpdate=false) const
const MyMoneyPrice fetchSinglePrice (const QString &fromIdList, const QString &toIdList, const QDate &date, bool exactDate, bool forUpdate=false) const
const QMap< QString,
fetchReports (const QStringList &idList=QStringList(), bool forUpdate=false) const
const QMap< QString,
fetchSchedules (const QStringList &idList=QStringList(), bool forUpdate=false) const
const QMap< QString,
fetchSecurities (const QStringList &idList=QStringList(), bool forUpdate=false) const
const QMap< QString,
fetchTransactions (const QString &tidList=QString(), const QString &dateClause=QString(), bool forUpdate=false) const
const QMap< QString,
fetchTransactions (const MyMoneyTransactionFilter &filter) const
bool isReferencedByTransaction (const QString &id) const
void readPayees (const QString &)
void readPayees (const QValueList< QString > payeeList=QValueList< QString >())
void readTransactions (const MyMoneyTransactionFilter &filter)
void setProgressCallback (void(*callback)(int, int, const QString &))
virtual void readFile (QIODevice *s, IMyMoneySerialize *storage)
virtual void writeFile (QIODevice *s, IMyMoneySerialize *storage)
void startCommitUnit (const QString &callingFunction)
bool endCommitUnit (const QString &callingFunction)
void cancelCommitUnit (const QString &callingFunction)
long unsigned getRecCount (const QString &table) const
long unsigned getNextBudgetId () const
long unsigned getNextAccountId () const
long unsigned getNextInstitutionId () const
long unsigned getNextPayeeId () const
long unsigned getNextReportId () const
long unsigned getNextScheduleId () const
long unsigned getNextSecurityId () const
long unsigned getNextTransactionId () const
long unsigned incrementBudgetId ()
long unsigned incrementAccountId ()
long unsigned incrementInstitutionId ()
long unsigned incrementPayeeId ()
long unsigned incrementReportId ()
long unsigned incrementScheduleId ()
long unsigned incrementSecurityId ()
long unsigned incrementTransactionId ()
void loadAccountId (const unsigned long &id)
void loadTransactionId (const unsigned long &id)
void loadPayeeId (const unsigned long &id)
void loadInstitutionId (const unsigned long &id)
void loadScheduleId (const unsigned long &id)
void loadSecurityId (const unsigned long &id)
void loadReportId (const unsigned long &id)
void loadBudgetId (const unsigned long &id)

Private Member Functions

QString & buildError (const QSqlQuery &q, const QString &function, const QString &message) const
void writeUserInformation (void)
void writeInstitutions (void)
void writePayees (void)
void writeAccounts (void)
void writeTransactions (void)
void writeSchedules (void)
void writeSecurities (void)
void writePrices (void)
void writeCurrencies (void)
void writeFileInfo (void)
void writeReports (void)
void writeBudgets (void)
void writeInstitution (const MyMoneyInstitution &i, MyMoneySqlQuery &q)
void writePayee (const MyMoneyPayee &p, MyMoneySqlQuery &q, bool isUserInfo=false)
void writeAccount (const MyMoneyAccount &a, MyMoneySqlQuery &q)
void writeTransaction (const QString &txId, const MyMoneyTransaction &tx, MyMoneySqlQuery &q, const QString &type)
void writeSplits (const QString &txId, const QString &type, const QValueList< MyMoneySplit > &splitList)
void writeSplit (const QString &txId, const MyMoneySplit &split, const QString &type, const int splitId, MyMoneySqlQuery &q)
void writeSchedule (const MyMoneySchedule &sch, MyMoneySqlQuery &q, bool insert)
void writeSecurity (const MyMoneySecurity &security, MyMoneySqlQuery &q)
void writePricePair (const MyMoneyPriceEntries &p)
void writePrice (const MyMoneyPrice &p)
void writeCurrency (const MyMoneySecurity &currency, MyMoneySqlQuery &q)
void writeReport (const MyMoneyReport &rep, MyMoneySqlQuery &q)
void writeBudget (const MyMoneyBudget &bud, MyMoneySqlQuery &q)
void writeKeyValuePairs (const QString &kvpType, const QString &kvpId, const QMap< QString, QString > &pairs)
void writeKeyValuePair (const QString &kvpType, const QString &kvpId, const QString &kvpKey, const QString &kvpData)
void readFileInfo (void)
void readLogonData (void)
void readUserInformation (void)
void readInstitutions (void)
void readAccounts (void)
void readTransaction (const QString id)
void readTransactions (const QString &tidList=QString(), const QString &dateClause=QString())
void readTransaction (MyMoneyTransaction &tx, const QString &tid)
void readSplit (MyMoneySplit &s, const MyMoneySqlQuery &q, const MyMoneyDbTable &t) const
const MyMoneyKeyValueContainer readKeyValuePairs (const QString &kvpType, const QString &kvpId) const
const QMap< QString,
readKeyValuePairs (const QString &kvpType, const QStringList &kvpIdList) const
void readSchedules (void)
void readSecurities (void)
void readPrices (void)
void readCurrencies (void)
void readReports (void)
void readBudgets (void)
void deleteTransaction (const QString &id)
void deleteSchedule (const QString &id)
void deleteKeyValuePairs (const QString &kvpType, const QString &kvpId)
long unsigned calcHighId (const long unsigned &, const QString &)
void setVersion (const QString &version)
void signalProgress (int current, int total, const QString &="") const
int splitState (const MyMoneyTransactionFilter::stateOptionE &state) const
const QDate getDate (const QString &date) const
const QDateTime getDateTime (const QString &date) const
int createDatabase (const KURL &url)
int upgradeDb ()
int upgradeToV1 ()
int upgradeToV2 ()
int upgradeToV3 ()
int upgradeToV4 ()
int upgradeToV5 ()
int upgradeToV6 ()
bool sqliteAlterTable (const MyMoneyDbTable &t)
bool addColumn (const MyMoneyDbTable &t, const MyMoneyDbColumn &c, const QString &after=QString())
bool addColumn (const QString &table, const QString &column, const QString &after=QString())
bool dropColumn (const MyMoneyDbTable &t, const QString &c)
bool dropColumn (const QString &table, const QString &column)
int createTables ()
void createTable (const MyMoneyDbTable &t)
void clean ()
int isEmpty ()
void alert (QString s) const
 MyMoneyStorageSql (const MyMoneyStorageSql &rhs)
MyMoneyStorageSqloperator= (const MyMoneyStorageSql &rhs)

Private Attributes

void(* m_progressCallback )(int, int, const QString &)
MyMoneyDbDrivers m_drivers
databaseTypeE m_dbType
MyMoneyDbDef m_db
unsigned int m_dbVersion
bool m_loadAll
bool m_override
QString m_error
long unsigned m_institutions
long unsigned m_accounts
long unsigned m_payees
long unsigned m_transactions
long unsigned m_splits
long unsigned m_securities
long unsigned m_prices
long unsigned m_currencies
long unsigned m_schedules
long unsigned m_reports
long unsigned m_kvps
long unsigned m_budgets
long unsigned m_hiIdInstitutions
long unsigned m_hiIdPayees
long unsigned m_hiIdAccounts
long unsigned m_hiIdTransactions
long unsigned m_hiIdSchedules
long unsigned m_hiIdSecurities
long unsigned m_hiIdReports
long unsigned m_hiIdBudgets
QString m_encryptData
bool m_displayStatus
QValueStack< QString > m_commitUnitStack
MyMoneyTransactionFilter m_preferred
bool m_readingPrices
QMap< QString, unsigned long > m_transactionCountMap
QString m_logonUser
QDateTime m_logonAt
QDateTime m_txPostDate
bool m_newDatabase

Detailed Description

The MyMoneyDbColumn class is a base type for generic db columns. Derived types exist for several common column types.

Constructor & Destructor Documentation

MyMoneyStorageSql::MyMoneyStorageSql ( IMyMoneySerialize storage,
const KURL &  = KURL() 

virtual MyMoneyStorageSql::~MyMoneyStorageSql (  )  [inline, virtual]

MyMoneyStorageSql::MyMoneyStorageSql ( const MyMoneyStorageSql rhs  )  [private]

Member Function Documentation

unsigned int MyMoneyStorageSql::currentVersion (  )  const [inline]

int MyMoneyStorageSql::open ( const KURL &  url,
int  openMode,
bool  clear = false 

MyMoneyStorageSql - open database file

url pseudo-URL of database to be opened
openMode open mode, same as for QFile::open
clear whether existing data can be deleted
0 - database successfully opened

1 - database not opened, use lastError function for reason

-1 - output database not opened, contains data, clean not specified

void MyMoneyStorageSql::close ( bool  logoff = true  ) 

MyMoneyStorageSql close the database


bool MyMoneyStorageSql::readFile ( void   ) 

MyMoneyStorageSql read all the database into storage


bool MyMoneyStorageSql::writeFile ( void   ) 

MyMoneyStorageSql write/update the database from storage


bool MyMoneyStorageSql::isDb2 (  )  const [inline]

bool MyMoneyStorageSql::isInterbase (  )  const [inline]

bool MyMoneyStorageSql::isMysql (  )  const [inline]

bool MyMoneyStorageSql::isOracle8 (  )  const [inline]

bool MyMoneyStorageSql::isODBC3 (  )  const [inline]

bool MyMoneyStorageSql::isPostgresql (  )  const [inline]

bool MyMoneyStorageSql::isSybase (  )  const [inline]

bool MyMoneyStorageSql::isSqlite3 (  )  const [inline]

const QString& MyMoneyStorageSql::lastError (  )  const [inline]

MyMoneyStorageSql generalized error routine

: error message to be displayed

virtual void MyMoneyStorageSql::fillStorage (  )  [virtual]

This method is used when a database file is open, and the data is to be saved in a different file or format. It will ensure that all data from the database is available in memory to enable it to be written.

void MyMoneyStorageSql::modifyUserInfo ( const MyMoneyPayee payee  ) 

The following functions correspond to the identically named (usually) functions within the Storage Manager, and are called to update the database

void MyMoneyStorageSql::addInstitution ( const MyMoneyInstitution inst  ) 

void MyMoneyStorageSql::modifyInstitution ( const MyMoneyInstitution inst  ) 

void MyMoneyStorageSql::removeInstitution ( const MyMoneyInstitution inst  ) 

void MyMoneyStorageSql::addPayee ( const MyMoneyPayee payee  ) 

void MyMoneyStorageSql::modifyPayee ( const MyMoneyPayee payee  ) 

void MyMoneyStorageSql::removePayee ( const MyMoneyPayee payee  ) 

void MyMoneyStorageSql::addAccount ( const MyMoneyAccount acc  ) 

void MyMoneyStorageSql::modifyAccount ( const MyMoneyAccount acc  ) 

void MyMoneyStorageSql::removeAccount ( const MyMoneyAccount acc  ) 

void MyMoneyStorageSql::addTransaction ( const MyMoneyTransaction tx  ) 

void MyMoneyStorageSql::modifyTransaction ( const MyMoneyTransaction tx  ) 

void MyMoneyStorageSql::removeTransaction ( const MyMoneyTransaction tx  ) 

void MyMoneyStorageSql::addSchedule ( const MyMoneySchedule sch  ) 

void MyMoneyStorageSql::modifySchedule ( const MyMoneySchedule sch  ) 

void MyMoneyStorageSql::removeSchedule ( const MyMoneySchedule sch  ) 

void MyMoneyStorageSql::addSecurity ( const MyMoneySecurity sec  ) 

void MyMoneyStorageSql::modifySecurity ( const MyMoneySecurity sec  ) 

void MyMoneyStorageSql::removeSecurity ( const MyMoneySecurity sec  ) 

void MyMoneyStorageSql::addPrice ( const MyMoneyPrice p  ) 

void MyMoneyStorageSql::removePrice ( const MyMoneyPrice p  ) 

void MyMoneyStorageSql::addCurrency ( const MyMoneySecurity sec  ) 

void MyMoneyStorageSql::modifyCurrency ( const MyMoneySecurity sec  ) 

void MyMoneyStorageSql::removeCurrency ( const MyMoneySecurity sec  ) 

void MyMoneyStorageSql::addReport ( const MyMoneyReport rep  ) 

void MyMoneyStorageSql::modifyReport ( const MyMoneyReport rep  ) 

void MyMoneyStorageSql::removeReport ( const MyMoneyReport rep  ) 

void MyMoneyStorageSql::addBudget ( const MyMoneyBudget bud  ) 

void MyMoneyStorageSql::modifyBudget ( const MyMoneyBudget bud  ) 

void MyMoneyStorageSql::removeBudget ( const MyMoneyBudget bud  ) 

unsigned long MyMoneyStorageSql::transactionCount ( const QString &  aid = QString()  )  const

const QMap<QString, unsigned long> MyMoneyStorageSql::transactionCountMap ( void   )  const [inline]

const QMap<QString, MyMoneyAccount> MyMoneyStorageSql::fetchAccounts ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

the storage manager also needs the following read entry points

const QMap<QString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance ( const QStringList &  id,
const QDate &  date 
) const

const QMap<QString, MyMoneyBudget> MyMoneyStorageSql::fetchBudgets ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

const QMap<QString, MyMoneySecurity> MyMoneyStorageSql::fetchCurrencies ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

const QMap<QString, MyMoneyInstitution> MyMoneyStorageSql::fetchInstitutions ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

const QMap<QString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

const MyMoneyPriceList MyMoneyStorageSql::fetchPrices ( const QStringList &  fromIdList = QStringList(),
const QStringList &  toIdList = QStringList(),
bool  forUpdate = false 
) const

const MyMoneyPrice MyMoneyStorageSql::fetchSinglePrice ( const QString &  fromIdList,
const QString &  toIdList,
const QDate &  date,
bool  exactDate,
bool  forUpdate = false 
) const

const QMap<QString, MyMoneyReport> MyMoneyStorageSql::fetchReports ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

const QMap<QString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

const QMap<QString, MyMoneySecurity> MyMoneyStorageSql::fetchSecurities ( const QStringList &  idList = QStringList(),
bool  forUpdate = false 
) const

const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions ( const QString &  tidList = QString(),
const QString &  dateClause = QString(),
bool  forUpdate = false 
) const

const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions ( const MyMoneyTransactionFilter filter  )  const

bool MyMoneyStorageSql::isReferencedByTransaction ( const QString &  id  )  const

void MyMoneyStorageSql::readPayees ( const QString &   ) 

void MyMoneyStorageSql::readPayees ( const QValueList< QString >  payeeList = QValueList< QString >()  ) 

void MyMoneyStorageSql::readTransactions ( const MyMoneyTransactionFilter filter  ) 

void MyMoneyStorageSql::setProgressCallback ( void(*)(int, int, const QString &)  callback  )  [virtual]

Implements IMyMoneyStorageFormat.

virtual void MyMoneyStorageSql::readFile ( QIODevice *  s,
IMyMoneySerialize storage 
) [inline, virtual]

Implements IMyMoneyStorageFormat.

virtual void MyMoneyStorageSql::writeFile ( QIODevice *  s,
IMyMoneySerialize storage 
) [inline, virtual]

Implements IMyMoneyStorageFormat.

void MyMoneyStorageSql::startCommitUnit ( const QString &  callingFunction  ) 

bool MyMoneyStorageSql::endCommitUnit ( const QString &  callingFunction  ) 

void MyMoneyStorageSql::cancelCommitUnit ( const QString &  callingFunction  ) 

long unsigned MyMoneyStorageSql::getRecCount ( const QString &  table  )  const

long unsigned MyMoneyStorageSql::getNextBudgetId (  )  const

long unsigned MyMoneyStorageSql::getNextAccountId (  )  const

long unsigned MyMoneyStorageSql::getNextInstitutionId (  )  const

long unsigned MyMoneyStorageSql::getNextPayeeId (  )  const

long unsigned MyMoneyStorageSql::getNextReportId (  )  const

long unsigned MyMoneyStorageSql::getNextScheduleId (  )  const

long unsigned MyMoneyStorageSql::getNextSecurityId (  )  const

long unsigned MyMoneyStorageSql::getNextTransactionId (  )  const

long unsigned MyMoneyStorageSql::incrementBudgetId (  ) 

long unsigned MyMoneyStorageSql::incrementAccountId (  ) 

long unsigned MyMoneyStorageSql::incrementInstitutionId (  ) 

long unsigned MyMoneyStorageSql::incrementPayeeId (  ) 

long unsigned MyMoneyStorageSql::incrementReportId (  ) 

long unsigned MyMoneyStorageSql::incrementScheduleId (  ) 

long unsigned MyMoneyStorageSql::incrementSecurityId (  ) 

long unsigned MyMoneyStorageSql::incrementTransactionId (  ) 

void MyMoneyStorageSql::loadAccountId ( const unsigned long &  id  ) 

void MyMoneyStorageSql::loadTransactionId ( const unsigned long &  id  ) 

void MyMoneyStorageSql::loadPayeeId ( const unsigned long &  id  ) 

void MyMoneyStorageSql::loadInstitutionId ( const unsigned long &  id  ) 

void MyMoneyStorageSql::loadScheduleId ( const unsigned long &  id  ) 

void MyMoneyStorageSql::loadSecurityId ( const unsigned long &  id  ) 

void MyMoneyStorageSql::loadReportId ( const unsigned long &  id  ) 

void MyMoneyStorageSql::loadBudgetId ( const unsigned long &  id  ) 

QString& MyMoneyStorageSql::buildError ( const QSqlQuery q,
const QString &  function,
const QString &  message 
) const [private]

void MyMoneyStorageSql::writeUserInformation ( void   )  [private]

void MyMoneyStorageSql::writeInstitutions ( void   )  [private]

void MyMoneyStorageSql::writePayees ( void   )  [private]

void MyMoneyStorageSql::writeAccounts ( void   )  [private]

void MyMoneyStorageSql::writeTransactions ( void   )  [private]

void MyMoneyStorageSql::writeSchedules ( void   )  [private]

void MyMoneyStorageSql::writeSecurities ( void   )  [private]

void MyMoneyStorageSql::writePrices ( void   )  [private]

void MyMoneyStorageSql::writeCurrencies ( void   )  [private]

void MyMoneyStorageSql::writeFileInfo ( void   )  [private]

void MyMoneyStorageSql::writeReports ( void   )  [private]

void MyMoneyStorageSql::writeBudgets ( void   )  [private]

void MyMoneyStorageSql::writeInstitution ( const MyMoneyInstitution i,
MyMoneySqlQuery q 
) [private]

void MyMoneyStorageSql::writePayee ( const MyMoneyPayee p,
MyMoneySqlQuery q,
bool  isUserInfo = false 
) [private]

void MyMoneyStorageSql::writeAccount ( const MyMoneyAccount a,
MyMoneySqlQuery q 
) [private]

void MyMoneyStorageSql::writeTransaction ( const QString &  txId,
const MyMoneyTransaction tx,
MyMoneySqlQuery q,
const QString &  type 
) [private]

void MyMoneyStorageSql::writeSplits ( const QString &  txId,
const QString &  type,
const QValueList< MyMoneySplit > &  splitList 
) [private]

void MyMoneyStorageSql::writeSplit ( const QString &  txId,
const MyMoneySplit split,
const QString &  type,
const int  splitId,
MyMoneySqlQuery q 
) [private]

void MyMoneyStorageSql::writeSchedule ( const MyMoneySchedule sch,
MyMoneySqlQuery q,
bool  insert 
) [private]

void MyMoneyStorageSql::writeSecurity ( const MyMoneySecurity security,
MyMoneySqlQuery q 
) [private]

void MyMoneyStorageSql::writePricePair ( const MyMoneyPriceEntries p  )  [private]

void MyMoneyStorageSql::writePrice ( const MyMoneyPrice p  )  [private]

void MyMoneyStorageSql::writeCurrency ( const MyMoneySecurity currency,
MyMoneySqlQuery q 
) [private]

void MyMoneyStorageSql::writeReport ( const MyMoneyReport rep,
MyMoneySqlQuery q 
) [private]

void MyMoneyStorageSql::writeBudget ( const MyMoneyBudget bud,
MyMoneySqlQuery q 
) [private]

void MyMoneyStorageSql::writeKeyValuePairs ( const QString &  kvpType,
const QString &  kvpId,
const QMap< QString, QString > &  pairs 
) [private]

void MyMoneyStorageSql::writeKeyValuePair ( const QString &  kvpType,
const QString &  kvpId,
const QString &  kvpKey,
const QString &  kvpData 
) [private]

void MyMoneyStorageSql::readFileInfo ( void   )  [private]

void MyMoneyStorageSql::readLogonData ( void   )  [private]

void MyMoneyStorageSql::readUserInformation ( void   )  [private]

void MyMoneyStorageSql::readInstitutions ( void   )  [private]

void MyMoneyStorageSql::readAccounts ( void   )  [private]

void MyMoneyStorageSql::readTransaction ( const QString  id  )  [private]

void MyMoneyStorageSql::readTransactions ( const QString &  tidList = QString(),
const QString &  dateClause = QString() 
) [private]

void MyMoneyStorageSql::readTransaction ( MyMoneyTransaction tx,
const QString &  tid 
) [private]

void MyMoneyStorageSql::readSplit ( MyMoneySplit s,
const MyMoneySqlQuery q,
const MyMoneyDbTable t 
) const [private]

const MyMoneyKeyValueContainer MyMoneyStorageSql::readKeyValuePairs ( const QString &  kvpType,
const QString &  kvpId 
) const [private]

const QMap<QString, MyMoneyKeyValueContainer> MyMoneyStorageSql::readKeyValuePairs ( const QString &  kvpType,
const QStringList &  kvpIdList 
) const [private]

void MyMoneyStorageSql::readSchedules ( void   )  [private]

void MyMoneyStorageSql::readSecurities ( void   )  [private]

void MyMoneyStorageSql::readPrices ( void   )  [private]

void MyMoneyStorageSql::readCurrencies ( void   )  [private]

void MyMoneyStorageSql::readReports ( void   )  [private]

void MyMoneyStorageSql::readBudgets ( void   )  [private]

void MyMoneyStorageSql::deleteTransaction ( const QString &  id  )  [private]

void MyMoneyStorageSql::deleteSchedule ( const QString &  id  )  [private]

void MyMoneyStorageSql::deleteKeyValuePairs ( const QString &  kvpType,
const QString &  kvpId 
) [private]

long unsigned MyMoneyStorageSql::calcHighId ( const long unsigned &  ,
const QString &   
) [private]

void MyMoneyStorageSql::setVersion ( const QString &  version  )  [private]

void MyMoneyStorageSql::signalProgress ( int  current,
int  total,
const QString &  = "" 
) const [private]

int MyMoneyStorageSql::splitState ( const MyMoneyTransactionFilter::stateOptionE state  )  const [private]

const QDate MyMoneyStorageSql::getDate ( const QString &  date  )  const [inline, private]

const QDateTime MyMoneyStorageSql::getDateTime ( const QString &  date  )  const [inline, private]

int MyMoneyStorageSql::createDatabase ( const KURL &  url  )  [private]

MyMoneyStorageSql create database

url pseudo-URL of database to be opened
true - creation successful

false - could not create

int MyMoneyStorageSql::upgradeDb (  )  [private]

int MyMoneyStorageSql::upgradeToV1 (  )  [private]

int MyMoneyStorageSql::upgradeToV2 (  )  [private]

int MyMoneyStorageSql::upgradeToV3 (  )  [private]

int MyMoneyStorageSql::upgradeToV4 (  )  [private]

int MyMoneyStorageSql::upgradeToV5 (  )  [private]

int MyMoneyStorageSql::upgradeToV6 (  )  [private]

bool MyMoneyStorageSql::sqliteAlterTable ( const MyMoneyDbTable t  )  [private]

bool MyMoneyStorageSql::addColumn ( const MyMoneyDbTable t,
const MyMoneyDbColumn c,
const QString &  after = QString() 
) [private]

bool MyMoneyStorageSql::addColumn ( const QString &  table,
const QString &  column,
const QString &  after = QString() 
) [private]

bool MyMoneyStorageSql::dropColumn ( const MyMoneyDbTable t,
const QString &  c 
) [private]

bool MyMoneyStorageSql::dropColumn ( const QString &  table,
const QString &  column 
) [private]

int MyMoneyStorageSql::createTables (  )  [private]

void MyMoneyStorageSql::createTable ( const MyMoneyDbTable t  )  [private]

void MyMoneyStorageSql::clean (  )  [private]

int MyMoneyStorageSql::isEmpty (  )  [private]

void MyMoneyStorageSql::alert ( QString  s  )  const [inline, private]

On occasions, e.g. after a complex transaction search, or for populating a payee popup list, it becomes necessary to load all data into memory. The following flags will be set after such a load, to indicate that further retrievals are not needed. This member variable holds a list of those accounts for which all transactions are in memory, thus saving reading them again This member variable is used when loading transactions to list all referenced payees, which can then be read into memory (if not already there)

MyMoneyStorageSql& MyMoneyStorageSql::operator= ( const MyMoneyStorageSql rhs  )  [private]

Member Data Documentation

void(* MyMoneyStorageSql::m_progressCallback)(int, int, const QString &) [private]

unsigned int MyMoneyStorageSql::m_dbVersion [private]

QString MyMoneyStorageSql::m_error [private]

long unsigned MyMoneyStorageSql::m_institutions [private]

long unsigned MyMoneyStorageSql::m_accounts [private]

long unsigned MyMoneyStorageSql::m_payees [private]

long unsigned MyMoneyStorageSql::m_transactions [private]

long unsigned MyMoneyStorageSql::m_splits [private]

long unsigned MyMoneyStorageSql::m_securities [private]

long unsigned MyMoneyStorageSql::m_prices [private]

long unsigned MyMoneyStorageSql::m_currencies [private]

long unsigned MyMoneyStorageSql::m_schedules [private]

long unsigned MyMoneyStorageSql::m_reports [private]

long unsigned MyMoneyStorageSql::m_kvps [private]

long unsigned MyMoneyStorageSql::m_budgets [private]

long unsigned MyMoneyStorageSql::m_hiIdInstitutions [private]

long unsigned MyMoneyStorageSql::m_hiIdPayees [private]

long unsigned MyMoneyStorageSql::m_hiIdAccounts [private]

long unsigned MyMoneyStorageSql::m_hiIdTransactions [private]

long unsigned MyMoneyStorageSql::m_hiIdSchedules [private]

long unsigned MyMoneyStorageSql::m_hiIdSecurities [private]

long unsigned MyMoneyStorageSql::m_hiIdReports [private]

long unsigned MyMoneyStorageSql::m_hiIdBudgets [private]

This variable is used to suppress status messages except during initial data load and final write

QValueStack<QString> MyMoneyStorageSql::m_commitUnitStack [private]

The following keeps track of commitment units (known as transactions in SQL though it would be confusing to use that term within KMM). It is implemented as a stack for debug purposes. Long term, probably a count would suffice

This member variable is used to preload transactions for preferred accounts

This member variable is used because reading prices from a file uses the 'add...' function rather than a 'load...' function which other objects use. Having this variable allows us to avoid needing to check the database to see if this really is a new or modified price

QMap<QString, unsigned long> MyMoneyStorageSql::m_transactionCountMap [private]

This member variable holds a map of transaction counts per account, indexed by the account id. It is used to avoid having to scan all transactions whenever a count is needed. It should probably be moved into the MyMoneyAccount object; maybe we will do that once the database code has been properly checked out

QString MyMoneyStorageSql::m_logonUser [private]

These member variables hold the user name and date/time of logon

QDateTime MyMoneyStorageSql::m_logonAt [private]

QDateTime MyMoneyStorageSql::m_txPostDate [private]

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

Generated on Wed Jan 26 13:09:30 2011 for KMyMoney by  doxygen 1.5.6