5 #include "TSQLServer.h"
31 TString
name(typeName);
36 if ( type == TSQLServer::kSQL_INTEGER || type == TSQLServer::kSQL_NUMERIC ) {
40 if ( name.BeginsWith(
"INT") ) { size =
kMaxInt; }
64 if ( type == TSQLServer::kSQL_CHAR && size <=
kMaxChar ) {
68 if ( type == TSQLServer::kSQL_CHAR || type == TSQLServer::kSQL_VARCHAR ) {
77 <<
"Unable to form SQL FairDbFieldType from: " << type << endl;
85 : fConcept(from.fConcept),
105 else if ( sql ==
"INT"
111 else if ( sql ==
"FLOAT"
116 else if ( sql ==
"CHAR"
119 || sql ==
"TINYTEXT" ) {
125 if ( sql ==
"CHAR" ) { size = 1; }
138 cout <<
"Unable to type from SQL: " << sql << endl;
242 if (
fSize == 1) { os <<
"CHAR"; }
246 else { os <<
"TEXT"; }
294 os <<
"BINARY_FLOAT";
298 os <<
"BINARY_DOUBLE";
305 if ( size == 1) { os <<
"CHAR"; }
306 else if ( size <=
kMaxChar) { os <<
"CHAR(" << size <<
')'; }
307 else { os <<
"VARCHAR(" << size <<
')'; }
438 cout <<
"Unable to form Root FairDbFieldType from: " << type << endl;
444 if ( size >= 0 ) {
fSize = size; }
452 #define MATCHES(x,y) \
453 (fConcept == x) && (concept == y) \
454 || (fConcept == y) && (concept == x)
456 if (
fConcept == concept ) {
return kTRUE; }
494 return "1980-00-00 00:00:00";
497 cout <<
"Unable to define undefined type for: "