<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/openerp/sql_db.py, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[REF] openerp: move `openerp` to `odoo`</title>
<updated>2016-09-02T15:28:12+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@openerp.com</email>
</author>
<published>2016-09-02T13:58:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9e64f9f9514194d74e166b032add8511182f2677'/>
<id>9e64f9f9514194d74e166b032add8511182f2677</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] registry: move functionalities from `RegistryManager` to `Registry`</title>
<updated>2016-09-01T11:43:45+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@openerp.com</email>
</author>
<published>2016-08-30T13:03:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a7445b4053f2e31866b5f608619dfb3859fe0a68'/>
<id>a7445b4053f2e31866b5f608619dfb3859fe0a68</id>
<content type='text'>
The API of `Registry` has been modified as follows:
 - `Registry(name)` returns the registry of the given database
 - `Registry.new(name)` forces the creation of a new `Registry` object
 - `Registry.delete(name)` discards the given registry
 - `Registry.delete_all()` discards all registries
 - `registry.setup_signaling()` initializes the signaling for `registry`
 - `registry.check_signaling()` returns an up-to-date `registry`
 - `registry.signal_registry_change()` notifies that `registry` has changed
 - `registry.signal_caches_change()` notifies potential cache invalidation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The API of `Registry` has been modified as follows:
 - `Registry(name)` returns the registry of the given database
 - `Registry.new(name)` forces the creation of a new `Registry` object
 - `Registry.delete(name)` discards the given registry
 - `Registry.delete_all()` discards all registries
 - `registry.setup_signaling()` initializes the signaling for `registry`
 - `registry.check_signaling()` returns an up-to-date `registry`
 - `registry.signal_registry_change()` notifies that `registry` has changed
 - `registry.signal_caches_change()` notifies potential cache invalidation
</pre>
</div>
</content>
</entry>
<entry>
<title>[MIG] models: convert class BaseModel to the new API</title>
<updated>2016-06-16T14:50:47+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@openerp.com</email>
</author>
<published>2016-05-13T09:26:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=19561727a7ee11f7493b3abaf83f9c08ada9f8ec'/>
<id>19561727a7ee11f7493b3abaf83f9c08ada9f8ec</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[REM] sql_db: legacy useless tests and duplicate exception block</title>
<updated>2016-03-08T15:46:25+00:00</updated>
<author>
<name>Olivier Dony</name>
<email>odo@openerp.com</email>
</author>
<published>2016-03-08T10:31:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ed7567d3f55b12181693ae27c0019aad849b7a80'/>
<id>ed7567d3f55b12181693ae27c0019aad849b7a80</id>
<content type='text'>
- The test for %f/%d is useless, eveybody has been using %s for
  ages, and the psycopg2 error is pretty explicit if you don't.
  It can introduce a small but useless delay for long queries.
- The duplicate except block was redundant with the generic `except
  Exception` block, with only a different log prefix.

+ the logging for the type testing of `params` was useless too,
raising a error is enough (though that particular test is still
relatively useful because the psycopg2 error isn't very clear
when you mess up the parameters)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- The test for %f/%d is useless, eveybody has been using %s for
  ages, and the psycopg2 error is pretty explicit if you don't.
  It can introduce a small but useless delay for long queries.
- The duplicate except block was redundant with the generic `except
  Exception` block, with only a different log prefix.

+ the logging for the type testing of `params` was useless too,
raising a error is enough (though that particular test is still
relatively useful because the psycopg2 error isn't very clear
when you mess up the parameters)
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] sql_db: use time.time() for timing query execution</title>
<updated>2016-03-08T15:45:48+00:00</updated>
<author>
<name>Olivier Dony</name>
<email>odo@openerp.com</email>
</author>
<published>2016-03-08T10:19:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c4429aa4993a8a38680ddf20f67d1b7797a7f171'/>
<id>c4429aa4993a8a38680ddf20f67d1b7797a7f171</id>
<content type='text'>
Minor improvement: subtracting time.time() floats is about
10x faster than creating `timedelta` objects, and the code
is simpler.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Minor improvement: subtracting time.time() floats is about
10x faster than creating `timedelta` objects, and the code
is simpler.
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] sql_db: log SQL queries before executing them</title>
<updated>2016-03-08T15:43:09+00:00</updated>
<author>
<name>Lionel Sausin</name>
<email>ls@numerigraphe.com</email>
</author>
<published>2016-03-02T12:07:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1a58e1085edfddde0c0be2b6d76cbf674b61fa4f'/>
<id>1a58e1085edfddde0c0be2b6d76cbf674b61fa4f</id>
<content type='text'>
That way queries are visible at DEBUG level while they
are executing, rather than after the fact, making
the log less confusing to watch when long-running queries
are involved.

Closes #11182
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That way queries are visible at DEBUG level while they
are executing, rather than after the fact, making
the log less confusing to watch when long-running queries
are involved.

Closes #11182
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] provide pg connection information as keywords</title>
<updated>2016-02-17T11:12:14+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2015-11-23T13:17:21+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=26a8b438b6cc94241354af9fe218d8c592e17cfa'/>
<id>26a8b438b6cc94241354af9fe218d8c592e17cfa</id>
<content type='text'>
When the database_or_uri is not a URI, rather than generate a dsn string
just collect the various psycopg2.connect keyword arguments in a
dictionary, and return that. This way psycopg2/libpq is the one doing
any necessary processing on the various parameters.

Fixes #3865 and fixes #6958 in a more resilient manner than manually
escaping dsn-injected values so database names or passwords containing
spaces or non-ascii characters work correctly.

In case a URI is provided to the dsn() function, return it as the `dsn`
keyword to get the same behaviour as previously.

Since we're checking dsns by equality, a dict should work just as well
as a string.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the database_or_uri is not a URI, rather than generate a dsn string
just collect the various psycopg2.connect keyword arguments in a
dictionary, and return that. This way psycopg2/libpq is the one doing
any necessary processing on the various parameters.

Fixes #3865 and fixes #6958 in a more resilient manner than manually
escaping dsn-injected values so database names or passwords containing
spaces or non-ascii characters work correctly.

In case a URI is provided to the dsn() function, return it as the `dsn`
keyword to get the same behaviour as previously.

Since we're checking dsns by equality, a dict should work just as well
as a string.
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port of branch saas-6 up to 2616def</title>
<updated>2016-01-29T11:29:17+00:00</updated>
<author>
<name>Denis Ledoux</name>
<email>dle@odoo.com</email>
</author>
<published>2016-01-29T11:29:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a8421996872922d1c71ecbd38b0ebf914fbb3e5b'/>
<id>a8421996872922d1c71ecbd38b0ebf914fbb3e5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port of branch 8.0 up to edeb5a8</title>
<updated>2016-01-29T10:41:24+00:00</updated>
<author>
<name>Denis Ledoux</name>
<email>dle@odoo.com</email>
</author>
<published>2016-01-29T10:41:24+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2616defe35d93193418a97030c307ec6551d0b00'/>
<id>2616defe35d93193418a97030c307ec6551d0b00</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] fields: use a "lazy" cursor to compute attribute `digits`</title>
<updated>2016-01-29T08:37:27+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@openerp.com</email>
</author>
<published>2016-01-27T17:00:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f0646cb51b236a3afd5e7289f5cd5986c88da8f6'/>
<id>f0646cb51b236a3afd5e7289f5cd5986c88da8f6</id>
<content type='text'>
Borrowing a cursor each time you access `field.digits` may be costly, because
of the connection reset.  Moreover, in most cases, the cursor is not used at
all, since the decimal precision are kept in cache.

For the installation of module `product` with its demo data, the number of
cursor allocations was reduced from ~1500 to about 50!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Borrowing a cursor each time you access `field.digits` may be costly, because
of the connection reset.  Moreover, in most cases, the cursor is not used at
all, since the decimal precision are kept in cache.

For the installation of module `product` with its demo data, the number of
cursor allocations was reduced from ~1500 to about 50!
</pre>
</div>
</content>
</entry>
</feed>
