release 1.3.0 (public release) - literal strings were not properly, so if you had: "My 's test" it was translated to this sql: 'My ''s test' - A specialized self reference was converted as a not null column: type node = [previous node]. This should have been a null column. - inits for an attribute that was a type were silently ignored. If it was a base, it worked. - InterBase did not allow insert of custom identities, i.e. insert t "10" its a = "b". did not work. Unexpectedly the before insert trigger seems to be fired after the actual insert. The current solution alleviates this problem, however it is not correct in a multi-user environment. If you mix custom identities and rely on generating automatic keys for the same table, and you are in a multi-user environment, you might get unexpected results, i.e. inserts rejected due to primary key constraints, and your generator may contain wrong values. - self references used in its list could produce wrong code if you had an longer its list: type node (I4) = parent_node. get node its parent_node its parent_node its parent_node. - completely rewritten the join builder. I was never satisfied with it in the first place anyway (messy code). The new one works a lot better and has less code as well. I remember putting days in it, not so many years ago, now I did it in just a single day. Maybe I'm learning... - mysql output generated a True for a Boolean column, but as it doesn't have a Boolean data type, xplain2sql converted Boolean data types to a char(1). The output therefore should have been a 'T' or 'F'. - xplain2sql would crash with a precondition violation if an attribute occuring in the sort clause of a get statement wasn't a valid attribute. - init output for TransactSQL and InterBase had wrong column name if attribute did not have a role. - Implement init support for PostgreSQL. Needs procedural language plpgsql to be loaded in the database! - Found bug in init handling: calculated expressions which refer to self references are not handled correctly it seems. I.e.: init a its b = parent_a its b + 0. outputs incorrect SQL. Haven't time nor the need at this moment to fix it. Let me know of you need this. PS: this works: init a its b = parent_a its b. - some function didn't work correctly in these cases: get some t. get some t "1". i.e. when no attribute was specified. In case no attribute is specified, the some function now correctly returns the identification of the selected instance. release 1.2.3 (public release) - a per with its clause in a get did not sort on the correct column, it sorted on the first column in the its list instead of the last. - moved source code to Perforce, away from PRCS, that's why the revision numbers have changed. release 1.2.2 - Attributes created with the extend clause could not be used to sort output of get, i.e. could not be used in the per clause. release 1.2.1 (not yet regression tested) - generated distinct clause for count was incorrect for select count(distinct *) release 1.2.0 (not yet regression tested) - SQL code for count does no longer need support for the coalesce function. It seems count returns a not Null value in all cases. - code generated for count statement was only correct for simple things like: get count a. Support is now added for counting sets like: get count a its b. This should work when b is a type or a base. - quoted identifiers (with `...') were not parsed correctly in case one had two of them on a single line, i.e.: get a its `b', `c'. did produce a parsing error. release 1.1.1 (not yet regression tested) - improved error message in case of extend a its b instead of extend a with b. - new Delphi ADO support: generation of an empty recordset without a select statement. An empty recordset contains all fields of an instance, but no data. Less database access means improved performance. - the bank.ddl example didn't work anymore after making the head string function a keyword. - In an update statement, one couldn't use an extend attribute to update a non extended attribute. xplain2sql gives a (not very clear) error in case you attempt to update an extended attribute itself. This is probably a bug and should be supported for platforms that can made to support this. - code generation for any function was wrong: it generated a correct answer in case you asked if something existed, but not correct if something didn't exist. Or, in SQL words: you got a Null in case nothing was found instead of a True. For SQL dialects that do not support the coalesce function, the code is still wrong. release 1.1.0 - Added a -mysql4 option, produces slightly different output. Also names are quoted now. Use -mysql322 to get the old code. No real new things though. - a constant assignment expression should now be surrounded by parenthesis. The previous variant will give a warning. This makes xplain2sql more compatible with the Xplain 5.8 syntax. - sometimes an expression starting with a (A or (I was mistakenly parsed (scanned) as a domain. Should be more robust now. - True or False could not be used as value in init default statements. - when a comment is encoutered between a type and an init (default) statement, the init (default)s are forgotten. I couldn't come up with a fix, perhaps in the future. - make the Xplain string, date and conversion functions a keyword. They're not yet converted to SQL though. Mathematical functions are not yet reserved. - a too long name would generate a precondition violation for InterBase. release 1.0.6 - somewhat different output for some function. The coalesce function is not used anymore. No idea what the default value should be and DB/2 doesn't like a Null as the last argument in coalesce. - a range with * used for integers had an undefined value. release 1.0.5 - xplain2sql crashed for update statements when the update refered to itself: update t "1" its a = a + 1. - created simple man page for xplain2sql. release 1.0.4 - TSQL: generates set nocount on/off statements for Xplain statements that do not return a row set. So extend and value statements should not return a count anymore. Helps to create stored procedures that do not depend on TSQL specific code. release 1.0.3 - Johan ter Bekke corrected me on my new value selection statement, which I introduced in version 0.9.0. Example: value myname = customer "1" its name. However, this should have been written using the some function: value myname = some customer "1" its name. xplain2sql will now generate a warning for the old construct. Support for the some function in this case has been added. - Full support for the some function has been added to Transact SQL. Haven't gotten around to add it DB/2 which also supports this. - prefix was missing when identify select was done, so the where clause for get t "1" didn't prefix the primary key column of t with the table name 't'. - the min/max functions could use a default value that was too large for a given data type. This happened of coalesce was supported. Now the max en min values are derived from the (inferred) data type if possible. The generated min/max values should now be correct for the I and R data types. Other types are not yet. Let me know when you need them. release 1.0.2 - names with spaces generated wrong InterBase 6 stored procedures. The name was not properly quoted. - order of stored procedure parameters when auto primary key is disabled (or not supported) was changed to be equal to the list when auto primary key generation is enabled. If this breaks some ones code, please let me know and I make the previous behaviour an option. - The '*' character in a range, (0..*) for example, expanded to MaxInt, now it properly takes the width of the base into account. release 1.0.1 - Added support for using definitions from .ddl files, without generating statements for definitions in those used files. Examples: .use "base.ddl" The used file must not contain the database or end statements. release 1.0.0 - support to include files. Use .include to include any Xplain data definition file. The included file may itself also include files. Examples: .include "base.ddl". .include "/src/projects/ddl/init.ddl". The included file must not contain the database or end statements. release 0.9.2 - enumeration with empty string would cause a crash, i.e.: base a (A2) = "", "aa". - Forgot to quote the prefix in the extension statement, so the fix in 0.9.0 didn't work for InterBase. - When no parameters are passed, the help file is shown. - real literals are not truncated anymore, but passed on as entered. Previously a value like 0.001 would be truncated to 0.0. - Added DB2 7.1 support. Two new things are primary generation and temporary table support. It seems these things are also available in previous versions, so you might want to use these script against older database too. If it work, I can make it available for the db2 v6 output too. For the temporary table support, make sure you have temporary table space, i.e. do something like: CREATE USER TEMPORARY TABLESPACE USR_TEMPSPC1 MANAGED BY SYSTEM USING ('usr_tempspc1') - When assertion used, TransactSQL insert and update stored procedures were incorrect. release 0.9.1 - when no filename is given, xplain2sql reads from stdin. release 0.9.0 - xplain2sql now exits with return code 1 if a failure occurs. This makes xplain2sql much more well behaved in Makefiles and such. Unfortunately, it had the effect that it does not compile with VisualEiffel anymore, but only with SmallEiffel. - Negative numbers didn't work quite well. They're a lot better now, so things like: init default t its a = -1 work. But things like: init default t its a = 5-1 probably fail now, so put a space around the minus sign. - Manual somewhat updated. Uses my new ConTeXt Xplain typesetting code. - extends using functions on dates didn't work, for example: extend customer with first invoiced = min invoice its date per customer. - fixed bug in extend conversion. When an extend was defined, based upon another extend on the same table, it generated incorrect SQL code. Not all columns were properly prefixed. - assert statement is somewhat supported now. If a translation supports computed columns an attempt is made to output something. The assertion's range is not checked, i.e. you cannot enforce that an invoice should have at least 1 invoice line. This requires after insert stored procedures and stored procedures that are only fired at the end of a transaction. Not many databases support the last requirement. For now, assertions should work with InterBase and MS SQL Server 7. Only assertions that use columns in the same table are supported, i.e. you cannot use subselects. - new kind of value definition added: value myname = customer "1" its name. release 0.8.7 - Removed bug in mw ADO generation: memo fields should have some specific size. - My first attempt at a c source release. release 0.8.6 - New option `-nodatabase' added. When set, the database command does not output anything, so it is easier to create scripts that can be run in different databases. release 0.8.5 - Support for InterBase 6. - Fixed bug in InterBase output: the foreign key references check was no longer being generated in some previous version. release 0.8.4 - Better PostgreSQL output. Only PostgreSQL 7 is supported now. release 0.8.2. - input files (.ddl) had to have unix line endings. This bug was noticed by Mark Hissink Muller and fixed in this release. - fixed bug in MS Access output: foreign key references where not outputted. - both MS Access 97 and MS Access 2000 should now be supported, but only MS Access 2000 is tested. - every create index statement for TSQL output now ends with a go. release 0.8.1. - Due to a request from Mark Hissink Muller I added Microsoft Access support. - And while I was busy with that, I also decided to add FoxPro. As I do not have regular access to FoxPro, let me know if the FoxPro SQL output has errors. I try to correct them as soon as possible. - Implemented portable index creation. This removes most of the need for using SQL statements. Indexes can be specified as: index mytype its indexname = some attribute, another attribute. You can also use `unique index', `clustered index' or `unique clustered index' instead of `index'. Note that the index keyword is not in the Xplain standard. - names specified with ` and ' are taken literally (quoted identifiers in SQL terms). This is not in the Xplain standard, but allows you to use any name. - I moved to PRCS as repository. Revision numbers and dates therefore changed accordingly. release 0.8.0 - select into statements created for extends with functions had an additional, unnecessary select statement. The coalesce select statement is now put into the select function statement. So instead of select coalesce (select sum(*) ..) we now have select distinct coalesce(sum(*), 0) (for distinct see below). - wrong SQL was generated in a case now in test.ddl, see type `te' and its get statement. - initial DB2 support! Missing are inits and auto-generated primary keys. - column names used in constraints definitions were not quoted. Table and column names in update and delete statements were also not quoted. As DB2 was more strict in usage of quoted identifiers, it seems every column/table usage is properly quoted now. - Existential extends could return more than one value. This was detected by DB2, so now the proper distinct is added. This was not a problem from TransactSQL because it doesn't need the from clause so it could return only scalar values. - Because DB2 only supports constraint names up to 18 characters, the constraint name generation was changed. Every constraint now starts with 'cXXXX_' where XXXX is a unique number. - TransactSQL doesn't generate rules anymore, but puts the constraint directly into the table. - columns in a select statement are now put every column on its own line. This is far more readable if you have a large number of attributes. - error reporting improved: every error should now give the correct line number. - Now uses the Formatter library, so it should be easier to port to other Eiffel compilers. As the Formatter library contains some bugs, if you want to recompile it, you really should have the latest Formatter library (July 2000 or later, depends on when its maintainer can make a new release). The library from 1999 will not do! - And indeed, it compiles now with Visual Eiffel 3.0! It does not run with VE due to the fact that its STRING class is not ELKS2001 compliant. - This also fixed a bug in fixed point constants: they were round to the nearest integer value. - fixed an important parsing bug when using extends. This bug was present for quite some time (supplier.ddl delivered wrong SQL code). This was detected because DB/2 is quite strict in its type conversions. So an its list like: get mytype its sometype its someextension. didn't work, only: get sometype its someextension. did work. - A rename operator `as' was added to rename columns in case they have duplicate names. - Support has been added for the Xplain sort operator per. Example: get user per user name. release 0.7.1 - xplain2sql sometimes identified itself as ddl2sql. - Generated wrong code for Delphi ADO DoDelete method. Should have used OriginalValue instead of Value. - supports insert "*" construct, so you don't have to specify a primary key in case you use generated primary keys. - first support for parameters in generated Xplain code. This helps creating stored procedures a lot, see the sample testtsql.ddl. Best option is probably to add stored procedure support to Xplain itself, but for now, there is something that works, although not in a portable manner. - TSQL: Attempts to drop a table now, if it exists, before creating it. This helps a bit to support scripts that use the same database, but different tables in that database. The database doesn't have to be dropped now to be able to run the script. But this works only if there are no foreign key constraints, so for really simple cases. release 0.7.0 - Delphi middleware code did not quote stored procedure names, so spaces in that name gave errors. - Fixed bug in Delphi ADO code: numeric data type did not set Precision and NumericScale. - xplain2sql converted base types to UDT's which allowed Nulls. This was not in accordance with the Xplain definition: when inserting an instance, every attribute must be given a value, unless there is an init expression for that attribute. Now attributes are not null by default. With the option -attributenull xplain2sql reverts to its previous behaviour. The default option can always be overriden with the required and optional keywords. Blobs, memo and picture fields, are still Null as their storage requirements are usually large if they have to contain some default value. - better init support in SQL Server: columns with non literal inits are now null. - basic mySQL support. mySQL lacks many features, but basic data definition seems to work. Because mySQL has no subselects, extends don't work. I also have no idea how mySQL's CHECK constraint works, so domain restrictions are disabled too. - SQL Server 7.0 output sets quoted identifiers on. Output is still done with brackets, but this allows you to use quoted identifiers. - xplain2sql generates now InterBase update and delete stored procedure. release 0.6.1 - xplain2sql can now generate low-level middleware code! At this momet it can create a Delphi object that calls the insert/update or delete procedure through ADO. - extend on money datatype didn't work. - detected basic inherit key problems. Generated joins are wrong if this option is True, and it isn't that easy to fix. Default is now inherit key off, and it is made a secret option. I still need it for some older files. release 0.6.0 - fixed bug in generation of constraint names. Long names easily resulted in non-unique names. - init support quite improved. Literal inits are now converted as default constraints. For non-literal inits, each back-end there are still some problems though - converted scanner and parser to Xplain 5.8 definitions. This meant reshuffling the entire xplain_parser.y. There is now one reduce/reduce conflict. It looks as if it is relsolved correctly though. - This also means that the `variable' statement has been replaced by the `constant' statement. - DOUBLE's are now written with to_string_format, a SmallEiffel specific feature. This fixes some problems with PostgreSQL. - Names of extend were not quoted, so they could not contain spaces. - insert procedure now always created, previously it was only created when a table had an auto-generated primary key. - creates now an insert, update and delete stored procedure for Transact SQL. - splitted Transact SQL into SQL Server 6.5 and 7.0 support. Main change is that SQL Server 7.0 uses brackets instead of quoted identifiers. Quoted identifiers have some problems with SQL-DMO and within the Enterprise Manager. Using brackets even spaces in data types can be supported in the future. release 0.5.3 - inherit primary key support for types with single ancestor. release 0.5.2 - generate new line before insert. - added sample sales.ddl, taken from "Can We Rely on SQL". - auto primary key support for ProgreSQL. - old style joins added for ProgreSQL which doesn't support ansi-92 joins. - InterBase doesn't create generators anymore when table doesn't have an auto generated primary key. - a get statement should always output the primary key, which it didn't. - far better support for variables and values with spaces. - When an InterBase trigger name got larger as 31 characters, a precondition violation ocurred. - total, min and max functions now work correctly with missing values (see sql trap described in Can We Rely on SQL?). Min/max only work for 32bit integers. release 0.5.1 - InterBase support didn't generate insert stored procedures anymore. release 0.5.0 Starting with xplain2sql, a completely new parser was written in Eiffel. It's goal is to support Xplain completely. Currently, it converts very large parts of Xplain to SQL. Support for the init statement isn't that good, and the check statement is entirely missing. Release 0.5.0 is the first more or less public release. It is send as an entry to the Eiffel Struggle '99. release 0.4 Released as ddl2sql it was used to generate Microsoft sql server code for the administrative system for the Urk Fish Auction, the largest flat-fish action in Europe. It had support for Microsoft SQL Server, InterBase, and Solid. It was called ddl2sql because it did only recognize the data definition part of Xplain. ddl2sql was written in Delphi 3. release 0.3 Released as ddl2tsql, it converted the data definition part of Xplain to Transact-SQL (the language of Microsoft SQL Server). ddl2tsql was written in Delphi 2. release 0.2 Released as schemer, it used the data definition part of Xplain to create dBase files. schemer was written in Turbo Pascal 7.0. release 0.1 This was a prototype to show that an automated way of converting Xplain to SQL was possible. This tool converted some of the data retrieval part of Xplain to SQL, but did this without any context information. So it really was a proof of concept. This tool, called sdbms, was written in Turbo Pascal 7/Turbo Vision.