[SqueakDBX] GlorpVarCharType >> typeString returns non working SQL

Panu Suominen panu.j.m.suominen at gmail.com
Wed Apr 6 07:38:36 UTC 2011

There is little problem with varchar field type in Glorp.
Following kind of table definitions in  DescriptorSystem are not working:
aTable createFieldNamed: 'zipcode' type: platform varChar.

This is because GlorpVarCharType can return non working SQL.
If one evaluates: (GlorpVarCharType new typeName: 'character varying')
it returns 'character varying(nil)' which does not compute (at least
not with postgresql).

This could be fixed by removing the typeString method from GlorpVarCharType
(then GlorpAbstractStringType >> #typeString will be used which works ok).

Currently I don't have opportunity to test this with other database systems.

Other options could be setting some default for varchar length or removing
DatabasePlatform >> #varChar and #varchar -methods.

Any opinions?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typeString-fix.1.cs
Type: text/x-csharp
Size: 140 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20110406/2b55b753/typeString-fix.1.bin

More information about the SqueakDBX mailing list