Commit graph

133 commits

Author SHA1 Message Date
Thomas Bruederli
24a6821749 Resolve UID -> MSGUID mapping from cache table index instead of using IMAP search 2014-04-01 16:32:28 +02:00
Thomas Bruederli
44088f37e6 Fix cache queries for ['tags','!=','x-complete'] 2014-03-17 13:16:10 +01:00
Aleksander Machniak
9f7cd83f92 Make 3rd argument of kolab_storage_cache::save() really optional (Bug #2863) 2014-02-25 10:47:10 +01:00
Thomas Bruederli
af6d366a1f Optimize access to kolab contacts using a sorted and limited query (#2828)
- Add columns for sorting in kolab_cache_contact
- Extend bin/modcache.sh script to update existing cache records
- Add setters for ORDER BY and LIMIT clauses
- Adapt the kolab_addressbook plugin to fetch contacts page-wise

ATTENTION: This changeset contains database schema changes!
Run `bin/updatedb.sh --dir plugins/libkolab/SQL --package libkolab`

Afterwards, the cached data needs to be updated. To do so, either run
  `plugins/libkolab/bin/modcache.sh update --type=contact`
or execute the following query
  DELETE FROM `kolab_folders` WHERE `type`='contact';
2014-02-10 11:46:50 +01:00
Thomas Bruederli
acbd45001c Return null on error for UID queries (to remain backwards compatible) 2014-02-10 11:39:24 +01:00
Thomas Bruederli
22a1c7a7ee Don't set error state on simple arrays; simplify query 2014-02-10 09:27:16 +01:00
Thomas Bruederli
816356813c Save error state in kolab_storage_cache::select() return value 2014-02-10 08:51:51 +01:00
Thomas Bruederli
98741574d9 Always return a valid array/iterator 2014-02-07 13:24:11 +01:00
Thomas Bruederli
2ade247a0c Return a kolab_storage_dataset itertor object from kolab_storage_cache::select()
to manage memory usage for large result sets (#2828).

Attention!
Do not cast the return value of kolab_storage_folder::select() calls into an array anymore.
2014-02-06 17:25:16 +01:00
Thomas Bruederli
965a9b74b3 Fix anually recurrence end date on 32bit systems by replacing (overflowing) unix timestamps with DateTime objects (#2613) 2014-01-22 11:22:23 +01:00
Aleksander Machniak
05003d0596 Fixes/improvements for use with kolab_cache=false 2014-01-07 16:28:06 +01:00
Thomas Bruederli
229d31e90e Avoid fatal errors if folder type information is missing (#1321) 2014-01-06 17:08:26 +01:00
Aleksander Machniak
b1e824becf Added error handling in select() and count(), so on error they will return null 2014-01-02 13:37:39 +01:00
Aleksander Machniak
a7c4ebf15d Fix kolab cache issues with malformed/unsupported character sequences
being stored in data, xml and words columns, which caused malformed
(and inaccessible) objects (Bug #1912, #2662)
2013-12-12 09:45:18 +01:00
Thomas Bruederli
158fa06a3c Fix moving of Kolab objects to other folders in cache (#2564) 2013-11-20 17:17:31 +01:00
Aleksander Machniak
bcc8008dd5 Replace insert() with save() - needed after refactoring in last commit 2013-11-20 12:45:52 +01:00
Aleksander Machniak
a25fc1a961 Implement cache object update with UPDATE query instead of DELETE + INSERT (Request #2351) 2013-11-20 10:43:17 +01:00
Thomas Bruederli
1f8e7cc478 Fix SQL syntax error when purging cache for a folder 2013-11-04 11:50:06 +01:00
Jeroen van Meeuwen (Kolab Systems)
4065542e07 Merge branch 'dev/kolab-cache-refactoring'
Conflicts:
	plugins/libkolab/lib/kolab_storage_cache.php
2013-10-17 16:48:08 +02:00
Thomas Bruederli
595f1b6a8c Only keep the last created object in memory (#2353) 2013-10-17 13:11:46 +02:00
Aleksander Machniak
053a640b87 Fix PHP warning when _sql_where() is callend with NULL as an argument 2013-10-14 15:04:00 +02:00
Aleksander Machniak
d67a7f0d76 Fix reference to kolab_cache table in count() method 2013-10-08 13:37:49 +02:00
Thomas Bruederli
cb8249d414 Rename kolab_folders.ID to kolab_folders.folder_id to be in sync with other Roundcube database conventions 2013-10-07 20:06:04 +02:00
Thomas Bruederli
6b89e36c4e Merge remote-tracking branch 'origin/libkolab-cache-bypass' into dev/kolab-cache-refactoring 2013-10-07 17:34:17 +02:00
Aleksander Machniak
71619510c4 Improve bypass() method so it works "recursively" 2013-10-07 15:57:55 +02:00
Aleksander Machniak
9d174daf9f Add option kolab_messages_cache_bypass 2013-10-07 15:05:34 +02:00
Thomas Bruederli
cc21e9161c Fix typo introduced in commit 8680256c54 2013-10-07 14:59:20 +02:00
Thomas Bruederli
4f69556b71 Only set sync lock if folder hash changed 2013-10-07 14:31:48 +02:00
Aleksander Machniak
8680256c54 Fix enabled imap threading mode when synchronizing kolab folder (Bug #2323) 2013-10-07 13:41:10 +02:00
Thomas Bruederli
20a731c540 Minor code improvements 2013-10-07 12:12:23 +02:00
Thomas Bruederli
b72709a5cf Lazy read kolab_folder record from DB; fix error when mass-inserting cache records 2013-10-07 11:59:00 +02:00
Aleksander Machniak
16d9509a5d Improved performance of kolab cache by bypassing Roundcube messages cache (Request #1740) 2013-10-07 09:56:06 +02:00
Thomas Bruederli
b7d4731d97 Let the derrived kolab_storage_cache classes provide the contents of their custom cache record fields 2013-10-04 19:32:21 +02:00
Thomas Bruederli
87335f387f Split kolab_cache table into folder-type specific tables and specialized kolab_storage_cache_* classes; the object type is now implicit 2013-10-04 17:14:34 +02:00
Thomas Bruederli
1a957820c4 Update resource URI of cache entries when renaming a folder (#2269) 2013-09-26 10:47:21 +02:00
Aleksander Machniak
c7dfb7c042 Fix INSERT undefined values for NOT NULL columns (Bug #2038) 2013-07-31 14:32:54 +02:00
Aleksander Machniak
bc4d15ab55 De-duplicate binary content when saving in database (#1749) 2013-06-17 15:44:17 +02:00
Aleksander Machniak
b602913ce3 Improve performance by reading max_allowed_packet variable (SHOW VARIABLES query) only if needed 2013-06-11 14:52:10 +02:00
Thomas Bruederli
44c19b496c Replace recursive calls with while loop when waiting for sync-lock (#1637) 2013-05-27 17:27:53 +02:00
Aleksander Machniak
1857a64d4f Fix undefined variable related errors caught in static code analysis 2013-05-07 12:56:18 +02:00
Aleksander Machniak
5f306222f2 Suppoprt more complicated cache queries, e.g. AND (tags LIKE ' tag1 ' OR tags LIKE ' tag2 ') 2013-04-22 15:52:37 +02:00
Aleksander Machniak
e03156fc1f Implemented new method of storing filename and mimetype of file objects 2013-04-19 14:20:55 +02:00
Thomas Bruederli
5b4c9500d1 Make some metadata from the Kolab storage backend available to the library user 2013-02-21 11:18:59 +01:00
Aleksander Machniak
f210104dda Cache in-memory objects returned by select() 2012-11-15 12:40:27 +01:00
Thomas Bruederli
79d71d0731 Always use Kolab format v3 for caching 2012-11-09 13:57:54 +01:00
Thomas Bruederli
f91e6ed831 Use generic escape() function to quote UIDs 2012-11-08 14:41:37 +01:00
Thomas Bruederli
6d75fdd5f3 Quote object UID for IMAP SEARCH command; read generated UID from XMLObject if we're working with libkolab bindings 2012-11-08 14:03:06 +01:00
Thomas Bruederli
d98e8787c6 Fix kolab_format_* classes to read v2 format; perpare kolab_storage to write out v2 format 2012-11-06 19:03:12 +01:00
Thomas Brüderli
b4ced09d2e Make use of libkolab/libcalendaring PHP bindings for computing recurring events 2012-10-23 15:05:38 +02:00
Aleksander Machniak
8fa4ddb8f0 Fix clearing the cache on object delete (#912) 2012-08-02 13:01:10 +02:00