Commit graph libervia-backend/src/memory/sqlite.py
Author SHA1 Message Date
Goffi
501bc92528 core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
2014-04-19 19:19:19 +02:00
souliane
fceb06836f memory: be sure that local_dir exists before creating a new database 2014-03-25 14:57:38 +01:00
souliane
03d4dcf029 plugin account: bug fix profile deletion from the database + unsubscribe the contacts 2014-03-24 16:21:14 +01:00
Goffi
a280080563 core (sqlite): automatic database update:
- new Updater class check database consistency (by calculating a hash on the .schema), and updates base if necessary
    - database now has a version (1 for current, 0 will be for 0.3's database), for each change this version will be increased
    - creation statements and update statements are in the form of dict of dict with tuples. There is a help text at the top of the module to explain how it works
    - if we are on a development version, the updater try to update the database automaticaly (without deleting table or columns). The Updater.generateUpdateData method can be used to ease the creation of update data (i.e. the dictionary at the top, see the one for the key 1 for an example).
    - if there is an inconsistency, an exception is raised, and a message indicate the SQL statements that should fix the situation.
    - well... this is rather complicated, a KISS method would maybe have been better. The future will say if we need to simplify it :-/
    - new DatabaseError exception
2014-02-23 23:30:32 +01:00
souliane
e63752db76 memory (sqlite): the result of pickle.dumps in addToHistory must be encoded for the special characters to be stored. 2014-02-12 21:46:48 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
souliane
63ba8ab235 memory: fixed getHistory behavior when parameter between=True:
- the previous behavior returns the messages between X and Y + between X and X
2013-10-23 00:28:00 +02:00
Goffi
8624c3c547 core, bridge: extra parameter is saved in history:
- added extra data in getHistory return value
    - extra data is saved in database
    /!\ WARNING: DATABASE SCHEMA HAS CHANGED /!\
to update sqlite database: ALTER TABLE history ADD COLUMN extra BLOB;
2013-11-07 15:29:39 +01:00
Goffi
4d08b7f72e core: fixed bad database creation on first run in sqlite storage 2013-06-20 17:17:35 +02:00
Goffi
1cd98e8dea fixed licences in docstrings (they are now in comments) 2013-03-08 00:36:22 +01:00
Goffi
e51a8a650b core: added forgotten errback in sqlite's deleteProfile 2013-01-21 00:59:50 +01:00
Emmanuel Gil Peyrot
45488f486c Fix pep8 support in src/memory. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
88074cd284 Remove every old-style class. 2013-01-18 17:55:35 +01:00
Emmanuel Gil Peyrot
27b3592e16 Remove trailing whitespaces. 2013-01-18 17:55:34 +01:00
Goffi
def79e44cd dates update 2013-01-07 23:30:13 +01:00
Goffi
252e4ccf6f core: sqlite storage constraint fix 2013-01-07 00:57:50 +01:00
Goffi
fa38394401 core, frontends, bridgen plugins: fixed methods which were unproperly managing multi-profiles
- added profile argument to askConfirmation, actionResult, actionResultExt, entityDataUpdated, confirmationAnswer, getProgress
    - core, frontends: fixed calls/signals according to new bridge API
    - user of proper profile namespace for progression indicators and dialogs
    - memory: getParam* now return bool when param type is bool
    - memory: added getStringParam* to return string instead of typed value
    - core, memory, storage, quick_frontend: getHistory now manage properly multi-profiles
    - plugins XEP-0047, XEP-0054, XEP-0065, XEP-0077, XEP-0096; multi-profiles proper handling
2012-11-10 16:38:16 +01:00
Goffi
fef2b1a620 core, bridge, quick_frontend: MUC private messages history management:
- history now store message type
    - sqlite3 storage: fixed resource management in getHistory
    - bridge: added message type in getHistory return value
    - quick_chats: (ugly) hacks to manage private history filtering/nickname printing
2012-10-17 00:35:48 +02:00
Goffi
c5a930b627 Licence modification: the full project is now under AGPL v3+ instead of GPL v3+ 2012-08-01 22:53:02 +02:00
Goffi
21dbb4473a copyleft date update 2012-03-06 09:07:24 +01:00
Goffi
53f1b5fcce core: - history management improved
- better timestamp precision for history
bridge + core: history signature change (now return a list instead of a dict, and timestamp is now float)
quick_frontend: - use of new history API
				- removed deprecated keep_last argument in getHistory (was only used by Sortilège)
2011-12-04 16:18:56 +01:00
Goffi
383f58333f core: fixed bad query in Sqlite storage 2011-12-03 22:21:27 +01:00
Goffi
75b502fff5 core: sqlite persistentBinaryDict storage fix 2011-11-30 00:23:50 +01:00
Goffi
f885ec0d74 core: - memory refactoring (moved memory.py and sqlite.py from tools to memory)
- private values are now stored in storage (currently sqlite database) and splitted in normal/binary storage. Normal storage is for string key/values, binary storage is for string key and any python data for value
	  - PersistentDict and PersistentBinaryDict are sugar classes to manage the data in storage thought a python dictionary like class.
2011-11-20 15:34:37 +01:00