Commit Graph

36 Commits

Author SHA1 Message Date
Aaron Seigo
13adc2ddd2 remove some dead code 2011-05-26 23:13:44 +02:00
Marco Martin
6d6826e603 fix delete; test for it 2011-04-29 11:17:31 +02:00
Aaron Seigo
e08799bab1 less access to client->, set results back correctly 2011-04-29 11:17:31 +02:00
Aaron Seigo
33ed49a303 use weak pointers 2011-04-29 11:17:30 +02:00
Aaron Seigo
ba985fcda5 take care to set a result 2011-04-29 11:17:30 +02:00
Marco Martin
88956b1539 get rid of the refcounted db connection 2011-04-29 11:17:30 +02:00
Marco Martin
f358f3de6d move all the sql query in an own thread 2011-04-29 11:17:30 +02:00
Marco Martin
084b7a1226 make the thread working 2011-04-29 11:17:30 +02:00
Aaron Seigo
a1bd4a3dc6 be sure to set a result 2011-04-29 11:17:30 +02:00
Aaron Seigo
4ea98632da paranoia 2011-04-29 11:17:30 +02:00
Aaron Seigo
1d550b15ea global transaction 2011-04-29 11:17:29 +02:00
Aaron Seigo
dfeb2c62ec insertions 2011-04-29 11:17:29 +02:00
Aaron Seigo
7cd768fd6f storing with new table 2011-04-29 11:17:29 +02:00
Aaron Seigo
15529aefcf getter for data 2011-04-29 11:17:29 +02:00
Aaron Seigo
2bca3c88d9 calling next() is good 2011-04-29 11:17:29 +02:00
Aaron Seigo
0fff74cec0 more careful with the client name 2011-04-29 11:17:28 +02:00
Aaron Seigo
549f988fee use a QVariantHash as well as a transaction for saving 2011-04-29 11:17:28 +02:00
Patrick Spendrin
c16bfacb7b forward port r1214358
svn path=/trunk/KDE/kdelibs/; revision=1214362
2011-01-14 11:23:22 +00:00
Marco Martin
393d207aca use an ulong to cast this, should be at the same size as pointer on both 32 and 64 bit systems
svn path=/trunk/KDE/kdelibs/; revision=1212577
2011-01-07 13:53:43 +00:00
Marco Martin
b43fc29221 use a single database connection per thread, anchieve that with a static QThreadStorage
each thread data will have a refcounted database instance

svn path=/trunk/KDE/kdelibs/; revision=1212521
2011-01-07 10:51:29 +00:00
Marco Martin
0c09d4b058 use a pointer since to remove a connection is necesary that the qsqldatabase is deleted, ouch
svn path=/trunk/KDE/kdelibs/; revision=1212424
2011-01-06 23:26:14 +00:00
Marco Martin
6d042ac25a close the strage db when the job is over.
there were dangling file pointers before that could crash plasma when they go beyond the maximum allowed limit
BUG:259833
CCBUG:247798
BUG:235051


svn path=/trunk/KDE/kdelibs/; revision=1212407
2011-01-06 21:43:51 +00:00
Marco Martin
dd6b783e13 new operations for Storage:
* expire, with age and group as parameters
* delete, with group and key as parameters

new db structure: creation time (still unused, but would be hard to add in future releases)
and access time, used for expire

svn path=/trunk/KDE/kdelibs/; revision=1192402
2010-11-02 22:05:48 +00:00
Marco Martin
535be3c4e2 correct the date storing
svn path=/trunk/KDE/kdelibs/; revision=1189354
2010-10-24 19:19:15 +00:00
Marco Martin
c2b3a225ab fix both retrieve queries
svn path=/trunk/KDE/kdelibs/; revision=1189333
2010-10-24 17:04:43 +00:00
Marco Martin
3333b71a3d . and - are not permitted as table names
svn path=/trunk/KDE/kdelibs/; revision=1189004
2010-10-23 17:28:08 +00:00
Marco Martin
fc454d4ab8 * "source" is "group"
* if no group is specified, "default" is assumed

svn path=/trunk/KDE/kdelibs/; revision=1188942
2010-10-23 12:14:33 +00:00
Marco Martin
aa08ed2808 delete already existing values before inserting new
svn path=/trunk/KDE/kdelibs/; revision=1188939
2010-10-23 12:06:21 +00:00
Marco Martin
72110136bc the table name depends from the plugin name of who is using storage
svn path=/trunk/KDE/kdelibs/; revision=1188938
2010-10-23 12:04:24 +00:00
Marco Martin
23cca9a318 source or key parameters in retrieve
expire action

svn path=/trunk/KDE/kdelibs/; revision=1188661
2010-10-22 21:22:15 +00:00
Marco Martin
4dd1c28b6d fix the wreckage caused by last commit
bad Aaron, no cookie :)
can you check if those changes make sense upon what your patch ws supposed to be?
CCMAIL:aseigo@kde.org

svn path=/trunk/KDE/kdelibs/; revision=1188445
2010-10-22 12:29:35 +00:00
Marco Martin
876b399640 remove eventual existing row wit the key before inserting a new row
svn path=/trunk/KDE/kdelibs/; revision=1181670
2010-10-01 18:02:13 +00:00
Marco Martin
b0472dc212 port the kconfig based storage service to Sqlite
make save and restore methods of datasource private for now
pu this early so performance/disk usage etc can be tested

svn path=/trunk/KDE/kdelibs/; revision=1181650
2010-10-01 16:58:15 +00:00
Albert Astals Cid
a3344d8f51 const &
svn path=/trunk/KDE/kdelibs/; revision=1171434
2010-09-03 21:14:32 +00:00
Brian David Pritchett
1259ea24cd Redid much of the storage capability and implemented many suggestions.
svn path=/trunk/KDE/kdelibs/; revision=1156347
2010-07-28 23:28:31 +00:00
Brian David Pritchett
2d98d307f2 I accidently deleted a file that was needed! Readding.
svn path=/trunk/KDE/kdelibs/; revision=1149245
2010-07-13 01:07:30 +00:00