Sql: ExportSch now uppercasing table names

git-svn-id: svn://ultimatepp.org/upp/trunk@6203 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2013-07-19 07:13:08 +00:00
parent 2ae411e6a9
commit 52d5ca1d2f

View file

@ -19,7 +19,7 @@ String ExportSch(SqlSession& session, const String& database)
Vector<String> tab = session.EnumTables(database);
Index<String> id;
for(int i = 0; i < tab.GetCount(); i++) {
r << sPutId("TABLE", id, tab[i]) << ")\r\n";
r << sPutId("TABLE", id, ToUpper(tab[i])) << ")\r\n";
Vector<SqlColumnInfo> c = session.EnumColumns(database, tab[i]);
for(int i = 0; i < c.GetCount(); i++) {
String type;
@ -40,13 +40,15 @@ String ExportSch(SqlSession& session, const String& database)
case STRING_V:
type = "STRING";
width = c[i].width;
if(width < 0 || width > 40000)
width = 2000;
break;
default:
type = "STRING";
width = 200;
break;
}
r << '\t' << sPutId(type, id, c[i].name, 8);
r << '\t' << sPutId(type, id, ToUpper(c[i].name), 8);
if(width > 0 && width < 40000)
r << ", " << width;
r << ")\r\n";