fix to return string valuem for retrieved dates (like times)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@40369 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2017-03-07 12:31:41 +00:00
parent e5d3ea6f6b
commit 83d4873389

View file

@ -964,8 +964,9 @@ static inline unsigned int trim(char *str, unsigned len)
switch (t)
{
case 1082: // Date
return newDateFromBuffer(p, trim(p, s));
case 1082: // Date (treat as string)
s = trim(p, s);
return newString(p, s, NSASCIIStringEncoding);
case 1083: // Time (treat as string)
s = trim(p, s);
@ -997,7 +998,6 @@ static inline unsigned int trim(char *str, unsigned len)
s = trim(p, s);
return newString(p, s, NSASCIIStringEncoding);
case 1182: // DATE ARRAY
case 1115: // TS without TZ ARRAY
case 1185: // TS with TZ ARRAY
if (0 == arrayType) arrayType = 'T'; // Timestamp
@ -1014,6 +1014,8 @@ static inline unsigned int trim(char *str, unsigned len)
case 1009: // TEXT ARRAY
case 1014: // "char" ARRAY
case 1015: // VARCHAR ARRAY
case 1182: // DATE ARRAY
case 1183: // TIME ARRAY
case 1263: // CSTRING ARRAY
if ('{' == *p)
{