2
.. i18n: Working with Web Services
3
.. i18n: =========================
6
Working with Web Services
7
=========================
9
.. i18n: How to load data ?
10
.. i18n: ------------------
16
.. i18n: 1. Postgresql
17
.. i18n: * Simple, standard
18
.. i18n: * Does not respect the WORKFLOW !!!
19
.. i18n: 2. XML files (with –update=)
21
.. i18n: * Script, same as website interface
26
* Does not respect the WORKFLOW !!!
27
2. XML files (with –update=)
29
* Script, same as website interface
31
.. i18n: How to backup/restore a Postgresql database?
34
How to backup/restore a Postgresql database?
41
.. i18n: pg_dump terp >terp.sql
44
pg_dump terp >terp.sql
51
.. i18n: createdb terp --encoding=unicode
52
.. i18n: psql terp < terp.sql
54
.. i18n: psql -d terp -f terp.sql
57
createdb terp --encoding=unicode
60
psql -d terp -f terp.sql
62
.. i18n: The objects methods
63
.. i18n: -------------------
69
.. i18n: 1. create({'field':'value'})
70
.. i18n: * return ID created
71
.. i18n: 2. search([('arg1','=','value1')...], offset=0, limit=1000)
72
.. i18n: * return [IDS] found
73
.. i18n: 3. read([IDS], ['field1','field2',...])
74
.. i18n: * return [{'id':1, 'field1':..., 'field2':..., ...}, ...]
75
.. i18n: 4. write([IDS], {'field1':'value1','field2':3})
76
.. i18n: * return True
77
.. i18n: 5. unlink([IDS])
78
.. i18n: * return True
81
1. create({'field':'value'})
83
2. search([('arg1','=','value1')...], offset=0, limit=1000)
85
3. read([IDS], ['field1','field2',...])
86
* return [{'id':1, 'field1':..., 'field2':..., ...}, ...]
87
4. write([IDS], {'field1':'value1','field2':3})