Commit Graph
92 Commits
Author SHA1 Message Date
Cédric Krier e2f80d378c Add timestamp field in backend
Improve validation of DateTime values
2009-11-10 14:00:13 +01:00
Cédric Krier d9cfdf8af8 Don't use date_trunc as it returns work type in SQLite 2009-11-03 15:23:07 +01:00
Cédric Krier ddbd7b2be1 Don't use now() in SQL statement as it doesn't work on SQLite 2009-11-03 15:22:17 +01:00
Cédric Krier 63407a4716 Add AS to select field in search to fix column names in dictfetchall with SQLite 2009-10-18 19:36:55 +02:00
Cédric Krier 18a360ee42 Add missing quote arround field_name when calling reduce_ids 2009-10-16 18:39:55 +02:00
Cédric Krier 49bdeec854 Call super for delete after write/delete of foreign keys because write and
delete can re-fill the cursor cache with deleted ids.
2009-10-12 16:56:29 +02:00
Cédric Krier 6221220e57 Use SQL query to search for foreign keys 2009-10-12 16:54:35 +02:00
Cédric Krier 3a7daa0609 Prevent double parenthesis for inselect subquery for issue1206
With double parenthesis SQLite uses only the first row
2009-10-09 15:56:40 +02:00
Cédric Krier 92fab4e81b Add datetime_field on xxx2Many to use a specific _datetime when reading the
related record
2009-10-05 15:41:10 +02:00
Cédric Krier 25ebb3606a Don't read history many2one if empty 2009-10-02 13:12:26 +02:00
Cédric Krier 68392d192d Add quote arround table name 2009-10-02 13:11:21 +02:00
Cédric Krier cadc9c40f0 Fix _sql_constraints validation when there is duplicated id in list for
issue1198
2009-09-30 14:42:00 +02:00
Cédric Krier d7a7cd4eee Don't fill cache in search for delete records for issue1176 2009-09-14 18:14:21 +02:00
Gour 486d46a405 fix typos for documentation (Model chapter) 2009-09-13 15:37:11 +02:00
Cédric Krier ae35028b5b Better fix for quote in dictionary of some SQLite version 2009-09-08 13:16:49 +02:00
Cédric Krier 1259ee9668 Add new tool reduce_ids 2009-09-08 13:03:57 +02:00
Cédric Krier a2ccd946a4 Strip quote from cursor dict because some SQLite version return it. 2009-09-08 09:28:43 +02:00
Cédric Krier 48ccca3ba9 Backed out changeset 2d20900b6eb3 2009-09-08 09:27:43 +02:00
Cédric Krier ed04d78f43 Strip quote from cursor dict because some SQLite version return it. 2009-09-08 08:47:37 +02:00
Cédric Krier f4568e0cde Factorise code by adding get_cache function on Cursor. 2009-09-07 15:34:04 +02:00
Cédric Krier 3cf4f4a7e3 Add limit_clause function on cursor 2009-09-07 15:18:17 +02:00
Cédric Krier ffc8d2ba57 Fill the cursor cache at search and use it in search_read and in one2many get 2009-09-07 10:39:09 +02:00
Cédric Krier da9464b39a Clean all create/write fields in create and write of ModelSQL 2009-08-28 16:40:25 +02:00
Cédric Krier 45914073bf Use faster join implementation:
- use generator when possible
- use tuple __mul__
2009-08-26 15:39:53 +02:00
Cédric Krier 8061d6c204 Faster implementation of sub_ids '%s' 2009-08-26 14:09:31 +02:00
Cédric Krier bfc92d0131 Use new iterobject on pool instead of object_name_list for speed improvement 2009-08-20 14:53:45 +02:00
Bertrand Chenal 3ed71f0674 Faster implementation of unique constraint validation 2009-08-12 10:34:49 +02:00
Cédric Krier ecb05626ec Remove wrong order parameter introduced in changeset f8162ed1fce2 2009-08-09 10:30:31 +02:00
Cédric Krier 074e94df72 Remove unnecessary ordered result for some search 2009-08-07 13:33:25 +02:00
Cédric Krier fba7a61651 Don't order search result if order value is [] 2009-08-07 13:09:51 +02:00
Cédric Krier 8235418015 Improve property get to work with a list of property names.
It reduces the number of queries to the database when reading records of
models that have a lot of property fields.
2009-08-05 19:06:52 +02:00
Cédric Krier cb08fdf3ed Fill _create_records just after INSERT to have it for fields with set function 2009-08-04 16:56:45 +02:00
Cédric Krier 79d4364fba Function fields must not be considered required for SQL exception 2009-08-04 16:55:48 +02:00
Cédric Krier 92757863f3 Handle _sql_constraints when database doesn't 2009-07-30 17:02:42 +02:00
Bertrand Chenal 5110236dd7 Fix: added missing space in sql query when searching on translatable fields. 2009-07-27 17:27:39 +02:00
Cédric Krier 225083f177 Add missing sql_format call for WHERE clause values 2009-07-24 17:26:14 +02:00
Cédric Krier b38b7ccd17 Fix typo, rowcount is not a function 2009-07-08 14:47:33 +02:00
Cédric Krier f820d707f5 Remove _sequence on ModelSQL
Add nextid, setnextid, currid, lastid to have a generic way to handle sequence
Add has_lock function to be more database independant
2009-07-07 19:32:31 +02:00
Cédric Krier aabb1fdbe6 Add quote arround field name to prevent use of keywords 2009-07-07 19:28:03 +02:00
Cédric Krier bd02e85cee Don't use hardcoded true/false in SQL queries to be more database independant 2009-07-07 19:22:56 +02:00
Cédric Krier a359c7c0a2 Fix the use of rowcount because it can return -1 or None according to PEP249 2009-07-07 19:14:51 +02:00
Cédric Krier 8067f0aa3a Fix SQL clause for 'not in' with False value 2009-06-23 10:24:32 +02:00
Cédric Krier 640e425a6b Allow to use integer for domain on many2many 2009-06-16 13:17:02 +02:00
Cédric Krier 0e0d72140a Read, write, create, delete permission on record rules 2009-06-15 14:02:11 +02:00
Cédric Krier da04200baa Skip models with table_query for ondelete 2009-06-12 18:42:24 +02:00
Cédric Krier a5d08185ef Read also non active records when creating brother_ids list in _update_tree 2009-06-04 09:23:30 +02:00
Cédric Krier e23c5ef3dd Backed out changeset 669b79e387c3 2009-06-04 09:14:33 +02:00
Bertrand Chenal 3b240300aa Fix: read also non active records when creating brother_ids list in _update_tree 2009-06-03 16:56:44 +02:00
Cédric Krier 655bdecd94 Doesn't append '%' to "like", "ilike" clauses 2009-05-27 19:41:04 +02:00
Cédric Krier 058000852a Don't use value to create inherits model if the field is overridden in model
Like that we have the same behavior then write
2009-05-20 14:04:11 +02:00