[SqueakDBX] GlorpVarCharType >> typeString returns non working SQL

Diogenes Moreira diogenes.moreira at gmail.com
Wed Apr 6 13:46:00 UTC 2011


Hi, Panu..

1. Remeber, this Glorp version is a port of Cincom Glorp Version... and we
try follow closely as posible it version.
2. Varchar type needed a parameter with the length of field.
plantform>>varchar is present only for compability with other types
definitions.
3. The SQL generated, depends on the Platform..in the especific platform is
the right place to introduces fixes for a especific database. in your case
PostgreSQLPlatform i can guess..

Best. D.

On Wed, Apr 6, 2011 at 4:38 AM, Panu Suominen
<panu.j.m.suominen at gmail.com>wrote:

> 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')
> typeString
> 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?
> --
> Panu
>
> _______________________________________________
> SqueakDBX mailing list
> SqueakDBX at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20110406/7767fa41/attachment.htm


More information about the SqueakDBX mailing list