mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
2ae411e6a9
commit
52d5ca1d2f
1 changed files with 4 additions and 2 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue