Joshua Kramer a écrit :
Olivier,
Thanks. Actually, a VARCHAR specifies how data is stored in the
database. A VARCHAR only takes as much storage on disk as the actual
data, where a CHAR always takes the field length even if the data is
shorter than the field lenth. So, one record in this table:
create table test (
value1 varchar(128),
value2 char(128)
)
where value1 = 'a' and value2 = 'b' will be 129 bytes, where
value1='aaa' and value2=b' will be 132 bytes. In short, you still need
to specify a field length for all fields. How can I tell, in a
CPSSchema, how long the fields are?
You cannot by default. What you can do is add size control on the widget that
the user will use to feed the fields of you entries.
You could also you write_expr to truncate text that is longuer than some limit
for instance. But I do not understand why you do not want to just use varchar()
instead of varchar(n).
--
Olivier
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users