diff -u uppsrc.6693/Sql/sch_header.h uppsrc.current/Sql/sch_header.h --- uppsrc.6693/Sql/sch_header.h 2014-02-05 12:50:48.528352353 +0100 +++ uppsrc.current/Sql/sch_header.h 2014-02-05 12:23:33.685988857 +0100 @@ -63,7 +63,8 @@ // SqlId -#define DOID(x) extern SqlId ADD_SCHEMA_PREFIX_CPP(x); //#define DOID(x) extern SqlId x; +#define DOID(x) extern SqlId ADD_SCHEMA_PREFIX_CPP(x); +#define DOID2(a, x) extern SqlId ADD_SCHEMA_PREFIX_CPP(a); #include SCHEMADIALECT diff -u uppsrc.6693/Sql/sch_model.h uppsrc.current/Sql/sch_model.h --- uppsrc.6693/Sql/sch_model.h 2014-02-05 12:45:04.146098925 +0100 +++ uppsrc.current/Sql/sch_model.h 2014-02-05 12:33:07.166014228 +0100 @@ -41,6 +41,9 @@ #ifndef DOID #define DOID(x) #endif +#ifndef DOID2 +#define DOID2(a, x) +#endif #ifndef TYPE #define TYPE(x) @@ -50,6 +53,10 @@ #define TYPE_(x) DOID(x) TYPE(x) #endif +#ifndef TYPE__ +#define TYPE__(a, x) DOID2(a, x) TYPE(x) +#endif + #ifndef END_TYPE #define END_TYPE #endif @@ -62,6 +69,10 @@ #define TYPE_I_(x, b) DOID(x) TYPE_I(x, b) #endif +#ifndef TYPE_I__ +#define TYPE_I__(a, x, b) DOID(a, x) TYPE_I(x, b) +#endif + #ifndef TYPE_II #define TYPE_II(x, b1, b2) TYPE(x) #endif @@ -70,6 +81,10 @@ #define TYPE_II_(x, b1, b2) DOID(x) TYPE_II(x, b1, b2) #endif +#ifndef TYPE_II__ +#define TYPE_II__(a, x, b1, b2) DOID2(a, x) TYPE_II(x, b1, b2) +#endif + #ifndef TYPE_III #define TYPE_III(x, b1, b2, b3) TYPE(x) #endif @@ -78,6 +93,10 @@ #define TYPE_III_(x, b1, b2, b3) DOID(x) TYPE_III(x, b1, b2, b3) #endif +#ifndef TYPE_III__ +#define TYPE_III__(a, x, b1, b2, b3) DOID2(a, x) TYPE_III(x, b1, b2, b3) +#endif + #ifndef TABLE #define TABLE(x) TYPE(x) #endif @@ -86,6 +105,10 @@ #define TABLE_(x) DOID(x) TABLE(x) #endif +#ifndef TABLE__ +#define TABLE__(a, x) DOID2(a, x) TABLE(x) +#endif + #ifndef END_TABLE #define END_TABLE END_TYPE #endif @@ -98,6 +121,10 @@ #define TABLE_I_(x, b) DOID(x) TABLE_I(x, b) #endif +#ifndef TABLE_I__ +#define TABLE_I__(a, x, b) DOID2(a, x) TABLE_I(x, b) +#endif + #ifndef TABLE_II #define TABLE_II(x, b1, b2) TYPE_II(x, b1, b2) #endif @@ -106,6 +133,10 @@ #define TABLE_II_(x, b1, b2) DOID(x) TABLE_II(x, b1, b2) #endif +#ifndef TABLE_II__ +#define TABLE_II__(a, x, b1, b2) DOID2(a, x) TABLE_II(x, b1, b2) +#endif + #ifndef TABLE_III #define TABLE_III(x, b1, b2, b3) TYPE_III(x, b1, b2, b3) #endif @@ -114,6 +145,10 @@ #define TABLE_III_(x, b1, b2, b3) DOID(x) TABLE_III(x, b1, b2, b3) #endif +#ifndef TABLE_III__ +#define TABLE_III__(a, x, b1, b2, b3) DOID2(a, x) TABLE_III(x, b1, b2, b3) +#endif + #ifndef VAR #define VAR(type, x) #endif @@ -122,6 +157,10 @@ #define VAR_(type, x) DOID(x) VAR(type, x) #endif +#ifndef VAR__ +#define VAR__(type, a, x) DOID2(a, x) VAR(type, x) +#endif + #ifndef COLUMN #define COLUMN(type, ctype, name, width, prec) #endif @@ -130,6 +169,10 @@ #define COLUMN_(type, ctype, name, width, prec) DOID(name) COLUMN(type, ctype, name, width, prec) #endif +#ifndef COLUMN__ +#define COLUMN__(type, ctype, alias, name, width, prec) DOID2(alias, name) COLUMN(type, ctype, name, width, prec) +#endif + #ifndef COLUMN_ARRAY #define COLUMN_ARRAY(type, ctype, name, width, prec, items) #endif @@ -139,6 +182,11 @@ DOID(name) COLUMN_ARRAY(type, ctype, name, width, prec, items) #endif +#ifndef COLUMN_ARRAY__ +#define COLUMN_ARRAY__(type, ctype, alias, name, width, prec, items) \ + DOID2(alias, name) COLUMN_ARRAY(type, ctype, name, width, prec, items) +#endif + #ifndef INLINE_ATTRIBUTE #define INLINE_ATTRIBUTE(x) #endif @@ -166,30 +214,44 @@ #undef STAMP #undef DOID +#undef DOID2 #undef DOC #undef TYPE #undef TYPE_ +#undef TYPE__ #undef END_TYPE #undef TYPE_I #undef TYPE_I_ +#undef TYPE_I__ #undef TYPE_II #undef TYPE_II_ +#undef TYPE_II__ #undef TYPE_III #undef TYPE_III_ +#undef TYPE_III__ #undef TABLE #undef TABLE_ +#undef TABLE__ #undef END_TABLE #undef TABLE_I #undef TABLE_I_ +#undef TABLE_I__ #undef TABLE_II #undef TABLE_II_ +#undef TABLE_II__ #undef TABLE_III #undef TABLE_III_ +#undef TABLE_III__ #undef VAR #undef VAR_ +#undef VAR__ #undef COLUMN +#undef COLUMN_ +#undef COLUMN__ #undef COLUMN_ARRAY +#undef COLUMN_ARRAY_ +#undef COLUMN_ARRAY__ #undef ATTRIBUTE #undef INLINE_ATTRIBUTE #undef TABLE_SUFFIX diff -u uppsrc.6693/Sql/sch_source.h uppsrc.current/Sql/sch_source.h --- uppsrc.6693/Sql/sch_source.h 2014-02-05 12:50:48.519089039 +0100 +++ uppsrc.current/Sql/sch_source.h 2014-02-05 12:23:39.405992453 +0100 @@ -1,7 +1,8 @@ // SqlId -#define DOID(x) SqlId ADD_SCHEMA_PREFIX_CPP(x)(#x); //#define DOID(x) SqlId x(#x); +#define DOID(x) SqlId ADD_SCHEMA_PREFIX_CPP(x)(#x); +#define DOID2(a, x) SqlId ADD_SCHEMA_PREFIX_CPP(a)(#x); #include SCHEMADIALECT diff -u uppsrc.6693/Oracle/OracleSchema.h uppsrc.current/Oracle/OracleSchema.h --- uppsrc.6693/Oracle/OracleSchema.h 2014-02-05 12:45:29.786890560 +0100 +++ uppsrc.current/Oracle/OracleSchema.h 2014-02-05 12:38:06.415993730 +0100 @@ -1,54 +1,73 @@ #define INT(x) COLUMN("number", int, x, 0, 0) #define INT_ARRAY(x, items) COLUMN_ARRAY("number", int, x, 0, 0, items) #define INT_(x) COLUMN_("number", int, x, 0, 0) -#define INT_ARRAY_(x, items) COLUMN_ARRAY("number", int, x, 0, 0, items) +#define INT_ARRAY_(x, items) COLUMN_ARRAY_("number", int, x, 0, 0, items) +#define INT__(a, x) COLUMN__("number", int, a, x, 0, 0) +#define INT_ARRAY__(a, x, items) COLUMN_ARRAY__("number", int, a, x, 0, 0, items) #define INT64(x) COLUMN("number", int64, x, 0, 0) #define INT64_ARRAY(x, items) COLUMN_ARRAY("number", int64, x, 0, 0, items) #define INT64_(x) COLUMN_("number", int64, x, 0, 0) -#define INT64_ARRAY_(x, items) COLUMN_ARRAY("number", int64, x, 0, 0, items) +#define INT64_ARRAY_(x, items) COLUMN_ARRAY_("number", int64, x, 0, 0, items) +#define INT64__(a, x) COLUMN__("number", int64, a, x, 0, 0) +#define INT64_ARRAY__(a, x, items) COLUMN_ARRAY__("number", int64, a, x, 0, 0, items) #define DOUBLE(x) COLUMN("number", double, x, 0, 0) #define DOUBLE_ARRAY(x, items) COLUMN_ARRAY(number, double, x, 0, 0, items) #define DOUBLE_(x) COLUMN_("number", double, x, 0, 0) #define DOUBLE_ARRAY_(x, items) COLUMN_ARRAY_("number", double, x, 0, 0, items) +#define DOUBLE__(a, x) COLUMN__("number", double, a, x, 0, 0) +#define DOUBLE_ARRAY__(a, x, items) COLUMN_ARRAY__("number", double, a, x, 0, 0, items) #define STRING(x, n) COLUMN("varchar2(" #n ")", String, x, n, 0) #define STRING_ARRAY(x, n, items) COLUMN_ARRAY("varchar2(" #n ")", String, x, n, 0, items) #define STRING_(x, n) COLUMN_("varchar2(" #n ")", String, x, n, 0) #define STRING_ARRAY_(x, n, items) COLUMN_ARRAY_("varchar2(" #n ")", String, x, n, 0, items) +#define STRING__(a, x, n) COLUMN__("varchar2(" #n ")", String, a, x, n, 0) +#define STRING_ARRAY__(a, x, n, items) COLUMN_ARRAY__("varchar2(" #n ")", String, a, x, n, 0, items) #define DATE(x) COLUMN("date", Date, x, 0, 0) #define DATE_ARRAY(x, items) COLUMN_ARRAY("date", Date, x, 0, 0, items) #define DATE_(x) COLUMN_("date", Date, x, 0, 0) #define DATE_ARRAY_(x, items) COLUMN_ARRAY_("date", Date, x, 0, 0, items) +#define DATE__(a, x) COLUMN__("date", Date, a, x, 0, 0) +#define DATE_ARRAY__(a, x, items) COLUMN_ARRAY__("date", Date, a, x, 0, 0, items) #define TIME(x) COLUMN("date", Time, x, 0, 0) #define TIME_ARRAY(x, items) COLUMN_ARRAY("date", Time, x, 0, 0, items) #define TIME_(x) COLUMN_("date", Time, x, 0, 0) #define TIME_ARRAY_(x, items) COLUMN_ARRAY_("date", Time, x, 0, 0, items) +#define TIME__(a, x) COLUMN_("date", Time, a, x, 0, 0) +#define TIME_ARRAY__(a, x, items) COLUMN_ARRAY_("date", Time, a, x, 0, 0, items) #define BOOL(x) COLUMN("varchar2(1)", bool, x, 0, 0) #define BOOL_ARRAY(x, items) COLUMN_ARRAY("varchar2(1)", bool, x, 0, 0, items) #define BOOL_(x) COLUMN_("varchar2(1)", bool, x, 0, 0) #define BOOL_ARRAY_(x, items) COLUMN_ARRAY_("varchar2(1)", bool, x, 0, 0, items) +#define BOOL__(a, x) COLUMN_("varchar2(1)", bool, a, x, 0, 0) +#define BOOL_ARRAY__(a, x, items) COLUMN_ARRAY_("varchar2(1)", bool, a, x, 0, 0, items) #define LONG(x) COLUMN("long", String, x, 0, 0) #define LONG_(x) COLUMN_("long", String, x, 0, 0) +#define LONG__(a, x) COLUMN_("long", String, a, x, 0, 0) #define LONGRAW(x) COLUMN("long raw", String, x, 0, 0) #define LONGRAW_(x) COLUMN_("long raw", String, x, 0, 0) +#define LONGRAW__(a, x) COLUMN_("long raw", String, a, x, 0, 0) #define BLOB(x) COLUMN("blob", String, x, 0, 0) #define BLOB_(x) COLUMN_("blob", String, x, 0, 0) +#define BLOB__(a, x) COLUMN_("blob", String, a, x, 0, 0) #define CLOB(x) COLUMN("clob", String, x, 0, 0) #define CLOB_(x) COLUMN_("clob", String, x, 0, 0) +#define CLOB__(a, x) COLUMN_("clob", String, a, x, 0, 0) #define SEQUENCE(x) SCHEMA("create sequence " #x " start with 1;",\ "drop sequence " #x ";") \ UPGRADE("create sequence " #x " start with 1;") #define SEQUENCE_(x) DOID(x) SEQUENCE(x) +#define SEQUENCE__(a,x) DOID2(a, x) SEQUENCE(x) #ifndef PRIMARY_KEY #define PRIMARY_KEY INLINE_ATTRIBUTE("primary key")