[Cubicweb] unique constraint on unlimited String attribute
florent.cayre at logilab.fr
Fri Jun 17 12:08:08 CEST 2016
On 06/16/16 15:03, Julien Cristau wrote:
> I guess one option is to have an extra computed column with a (fixed
> size) hash of your nvarchar(max) column, and index *that*, but
> reconsidering either the index or the lack of size limit might be
Agreed for search (indexed=True in yams), not for uniqueness
(unique=True in yams).
This suggestion would also make it possible to handle cwuri's example
properly (using a limited-in-length but reversed string for the indexed
column for instance). There should be litterature around for this topic.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Cubicweb