summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * move the headers from partition/schema-validation/ to their parent dirOswald Buddenhagen2012-06-276-5/+5
| | | | | | | | | | | | | | the private headers in a subdir don't play too well with installed builds Change-Id: Ia58e25f1e15874a36c6a295c8d75f873f30cac29 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
| * Remove private header include from public headerKalle Juhani Lehtonen2012-06-271-1/+0
|/ | | | | | | | It is both unnecessary and a plain no-go. Change-Id: I1e0676141e04b27b4699a617691f59d03bb2709c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Added "\brief statements"Nico Vertriest2012-06-196-0/+6
| | | | | Change-Id: Ic660a4a5838a276cfee0c35b8499c20ca0b79ca1 Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
* Use consistent naming of partitions in testJo Asplin2012-06-131-4/+4
| | | | | | | | Partition names within the same case should have the same suffix. Change-Id: Ib4ff0fbcd823ce8fe44a80a540087c79bafb6b9a Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Fixed doc for QJsonDbReadObject requestDenis Dzyubenko2012-06-131-3/+1
| | | | | Change-Id: Id7d9f9ba23b19af6036212ce2784840811b8e707 Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* Make sure invalid partition function calls work propertlyAli Akhtarzada2012-06-132-4/+48
| | | | | | | | Make sure the return values are what is expected and that there is no seg faulting Change-Id: I344835bca44ba0277813ae2465b79f286fd11f37 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove objects in batches for reduces and mapsAli Akhtarzada2012-06-132-10/+6
| | | | | Change-Id: I910745a32f89c44f3a8481d8a6ed34d37211b137 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Don't close and open if hbtree already openAli Akhtarzada2012-06-131-4/+5
| | | | | Change-Id: I638c478ad297b55095a6b53bbd0f6c614ddd8a14 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fix warnings in declarative examplesTapani Mikola2012-06-124-24/+34
| | | | | Change-Id: I588987412859713de3fe5fdf1f5d67fa8a97bf02 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* .pro file clean upsTapani Mikola2012-06-123-3/+3
| | | | | | | | Daemon does not directly depend on qml. Jsondb-client does not directly depend on qml or gui. Change-Id: Ie7ce3c2564825b060f9ee481e8eb76f1c3b227ff Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Close indexes with object tablesAli Akhtarzada2012-06-111-0/+1
| | | | | | Change-Id: I4656b6fe7802d4a810aa13e290707e41d2eb92e6 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Fixes access to private partitions from multiple threads.Denis Dzyubenko2012-06-114-18/+205
| | | | | | | | | Multiple QJsonDbConnection instances (possibly living in different threads) should be able to safely access same or different private partitions. Change-Id: Idfb435784dd173ed661835f0f20986d1c50e0d7a Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* Fix a crash in query modelTapani Mikola2012-06-113-3/+95
| | | | | | | | Query model (and list model that uses it) was crashing, if query was changed while the model had pending queries. Change-Id: Ibaa5c72696d201200ba4e5c53d17594625df3b97 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Fixed subscription to a notification without explicitly specifying _typeDenis Dzyubenko2012-06-112-1/+35
| | | | | | | | | | | | If the don't know the _type we cannot figure out the object table the object is stored in, so for now lets assume it is the main object table. This will still be broken if the assumption is wrong and the query like [?_uuid="{123}"] is actually against a view object, but this should be fixed in one of the next patches where we remove the concept of object tables and store all objects in one main object table. Change-Id: Icc259cc857b691acca3f316d7dea29244616ffe3 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Speed up [?_uuid="undefined"] queriesJamey Hicks2012-06-082-0/+6
| | | | | | | | | | | | This query is causing jsondb to read the whole object table even though it will never match. If the min or max key value provided to JsonDbUuidQuery::seekToStart is not a valid UUID, then return false. This will cause the query to return 0 objects without reading any of the object table. Change-Id: Ie337cd66cb6d789066cd07847cc8c00ed86d5dce Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Added a signal QJsonDbReadObjectRequest::objectUnavailable()Denis Dzyubenko2012-06-083-2/+56
| | | | | | | | | | | | There was already a convenience signal that is emitted when object is found, however when object is not found in the database, nothing but finished() was emitted with zero results, which made the convenience api not convenient to use :) Change-Id: I3ea18ac37bbfd60a090b2f9f5b662df30133437e Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Jing Bai <jing.t.bai@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Removed some redundant codeJo Asplin2012-06-081-2/+2
| | | | | Change-Id: I4b39adcb17376a1c1be2bf3610b9d31eb05b3d3a Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Ensure default partition on non-removable mediumJo Asplin2012-06-085-147/+241
| | | | | | | | | | | | | | | | This patch modifies the behavior introduced by 53df42aee7db1b4f8446c63939d2cb3b7c553078 as follows: Upon loading a partition definition that has both the removable and default properties set to true, the daemon now sets the default property to false instead of exiting. If all partitions are marked as removable, the daemon creates a new one (in CWD, assumed to be on a non-removable medium!) to serve as the default partition. Change-Id: Ia2911d5847040bef7a638d64e8102eba4c8c60a8 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* cleanup popRequestBai Jing2012-06-082-12/+22
| | | | | | | | | We should pop the request only if it is pushed to the stack and the request is finished or error occurrs. Change-Id: I124f15e0f246a1099992c4f89a5d7b5f35724753 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* Fixed created QJsonDbWatcher with invalid state numberDenis Dzyubenko2012-06-084-7/+104
| | | | | | | | | if the state number is too far in the future, or the partition is not available, or the watcher spans multiple object tables, report an error to the caller. Change-Id: I4b1e4fa2859b1e781f5b3d70e639c70fab1ae2db Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Improve offset - limit query performanceTapani Mikola2012-06-088-15/+243
| | | | | | | | | | | | | | | | | | JsonDBListModel uses offset - limit queries to read the objects it needs into its internal client side cache. Offset - limit queries have been painfully slow due to having to always start to count from the beginning of the index. This patch adds a cache (query --> { offset -> indexKey }) into the JsonDbIndex and fills & uses that in JsonDbPartitionPrivate::doIndexQuery. Improves performance ~20x in 1000 item list when scrolling up and down. Change-Id: I080ae88a8daee5fb593a348f1327696f4a8bf100 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Added partition name to debugQuery and object types to performance logJamey Hicks2012-06-072-3/+9
| | | | | Change-Id: I86d4735bb111454ead3a8558272933c076a504f8 Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com>
* Added JsonDbSettings::debugIndexes()Jamey Hicks2012-06-073-4/+10
| | | | | Change-Id: Ic6a7293a8b0b87577e55923dcf586dd989edec32 Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com>
* Add a benchmark that mimics the way how list model uses jsondbTapani Mikola2012-06-071-0/+33
| | | | | Change-Id: Ia5895aa11728a2c4e2f6478bc39540dfc393dff3 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Use correct include for message handlerKai Koehne2012-06-071-1/+1
| | | | | Change-Id: I074e4a84999ff22b547eedb19d9f6a9b28b002d8 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Removed unnecessary LIBS from autotestsDenis Dzyubenko2012-06-075-10/+0
| | | | | Change-Id: I9cd02837532e36b594a6cb01c6f620e175ce2844 Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* Removed unused function that used to create indexes defined by schemasDenis Dzyubenko2012-06-072-15/+0
| | | | | | Change-Id: I4ec17b23d4788cde9715beb6753adf97f08ebcd8 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com> Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* Added error checks for -config-path jsondb argumentDenis Dzyubenko2012-06-071-6/+9
| | | | | Change-Id: I49b309559ebb49b22760655f77ceb0bd562b19c3 Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* fix jsondb-client doesn't quit properlyBai Jing2012-06-071-2/+2
| | | | | | | | | | When quiting while the thread is not running, it waits there forever This causes jsondb-client doesn't quit when it receives "quit" command Bug: 3539 Change-Id: Ibc4b6374c4faca0424a9ebb1a4b5a259b3572c73 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* release notifications when closing dbserverBai Jing2012-06-061-0/+1
| | | | | | | valgrind complains about not freeing notifications Change-Id: I5554f5abf351bd03b552b9d837ced6f0769f1456 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Add doc/html & doc/ditaxml into .gitignoreTapani Mikola2012-06-061-1/+2
| | | | | Change-Id: I743a0624cfda7b47a0be059acf2e4242d0b4f2de Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Get rid of make docs warnings with jsondatabase.hTapani Mikola2012-06-061-6/+5
| | | | | Change-Id: I4608aed90a8024bb68589972d030c929391a548a Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* ListModel and QueryModel documentation clean upTapani Mikola2012-06-062-46/+26
| | | | | Change-Id: I0c00c4ffdb216df175a15d3b8a7c20512f99ced6 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Add missing Q_ENUMSTapani Mikola2012-06-061-0/+1
| | | | | Change-Id: Ib7d19f1b21b811215bb161f56ae59d87ee012255 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Enable JS injection in Json DbGuenter Schwann2012-06-066-1/+132
| | | | | Change-Id: I0a0a4497fda098d9bbe6f97d32bcfd4f2a872137 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Update all the eager views that depend on a source object changeJamey Hicks2012-06-063-1/+102
| | | | | | | | | | | | | This previous change to this part of the code was to prevent a given object change from being processed multiple times. However, I put the break in the wrong level of the loop, so only the first eager view depending on that source type would be updated, and others would just be marked as updated without being processed. Fixes Bug #16440. Change-Id: I1634a249e4ec6923100950fc5f45e449588b01d2 Reviewed-by: Jing Bai <jing.t.bai@nokia.com>
* Do not open index right after closing just to get filenameAli Akhtarzada2012-06-061-3/+2
| | | | | | Change-Id: I547683607b00dc3cc5a2914636b7d8924ac0beb0 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com> Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Use JsonDbCachingListModel to provide also JsonDbListModelTapani Mikola2012-06-0510-2153/+467
| | | | | | | | | | | | | | | | | | | No sense to maintain two implementations of the same functionality. JsonDBListModel was also blocking the ui way too much. Added (deprecated) methods & properties to caching list model to support JsonDbListModel. Setters were not implemented as it is a bad idea anyway and Partition.update should be used. After that renamed caching list model as JsonDBListModel. Changed also documentation accordingly. Incompatibilities: Setters are not supported and data() is async (=can return undefined + signal dataChanged later on when real data is available) Change-Id: I641d80361db728a3cdf1584e75ad18f22d9223a8 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Allow custom properties to be injected to items in the modelPrasanth Ullattil2012-06-058-20/+209
| | | | | | | | | The 'propertyInjector' contains the javascript function which will be called for each item in the model. The returned object is inserted to the item. Change-Id: If645d4896f92c79622ac76247ab39ec49da5b3a7 Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com>
* Fixed documentation for Index objectsDenis Dzyubenko2012-06-051-11/+4
| | | | | Change-Id: Ida52fb7b19afaebdc14f1a8a6bcaaa60309ef2f9 Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
* Try to make jsondb build again in CITapani Mikola2012-06-052-2/+2
| | | | | Change-Id: Ia97425e6b630608b865c1810cf1faf2f0f2f2482 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Get rid of debug clutter in parition auto testsAli Akhtarzada2012-06-051-10/+19
| | | | | Change-Id: I25bdc36b070ea5f0e96da375bedbc1444759b994 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Get rid of unnecessary semicolonAli Akhtarzada2012-06-051-1/+1
| | | | | Change-Id: Id9502cad22639f71cdee4d5d7962c2d01879e1e6 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Remove unnecessary contains call in validateIndexAli Akhtarzada2012-06-051-5/+6
| | | | | Change-Id: I831689b3c464c48a5b4f93252be4841b3334d393 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Changed HBtree to take advisory lock on each open of the db file.Denis Dzyubenko2012-06-044-16/+26
| | | | | | | | | | | | This changes btree to hold the advisory lock the whole time the btree file is kept open and accessed. The current implementation does not support concurrent access from multiple processes (or even from multiple file descriptors in the same process) - neither for writes nor for reads. Holding the lock on the file should ensure that if somehow multiple processes try to open the same database file, we don't just corrupt the db file, but gracefully fail to open it. Change-Id: Ib0c6e3aec0e087fedbfbb859758773182e74e46f Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
* Use QPointer instead of QWeakPointer for tracking QObjects.Stephen Kelly2012-06-044-20/+20
| | | | | | Change-Id: I182d0f19217277842f5681d1cfde9d03306f65d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Don't mess up JSONDB_SOCKET environment variableJo Asplin2012-06-041-3/+15
| | | | | | | | | | | | | TestQJsonDbRequest::dontAllowDefaultAndRemovablePartition() launches a secondary test daemon that updates the global JSONDB_SOCKET environment variable as a side effect. It therefore needs to restore it back to the primary value after each call. Also eliminate runtime warnings due to the path not being explicitly set in the partition definition. Change-Id: I2a201d4f4fff419f0f6d04582c4c4210ea0094f0 Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
* Autotest for storage system.Carlos Manuel Duclos Vergara2012-06-043-1/+279
| | | | | | | | The purpose of this autotest is to check different storage conditions, including out of space and device errors. Change-Id: I47bf94ea7f3f9c41bfc1f1036f6047f5e214e9d4 Reviewed-by: Jo Asplin <jo.asplin@nokia.com>
* Add new private QJsonDbQueryModel class to client.Cristiano di Flora2012-06-0420-1744/+2343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change separates the cachinglistmodel logic from the implementation of qml-specific aspects of the jsondbcachinglistmodel. The code is migrated into new private classes in client and reused by the imports/jsondb models. The new classes include functionality of the following components previously embedded in the qml jsondb plugin: - JsonDbCachingListModel - modelutils - modelcache In the new setup, the QJsonDbQueryModel class implements the functionality previously provided by the src/imports/jsondb JsonDbCachingListModel and JsonDbCachingListModelPrivate classes. Modelutils and modelcache helpers are now also part of the private API in client. No functional / performance regression is observed after running models tests and benchmarks on top of this. The idea is to make QJsonDbQueryModel part of the public C++ api after a few rounds of reviewes & iterations. Change-Id: Ia6e2368a4cb7c7485087e714642e00ff686945b7 Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com>
* Removed unnecessary qPrintable()Jo Asplin2012-06-041-1/+1
| | | | | Change-Id: I0d6d12374d452d11d8dc3fbff9696bed3ccc9fa1 Reviewed-by: Jo Asplin <jo.asplin@nokia.com>