diff --git a/db/vfp9/datatypes.xml b/db/vfp9/datatypes.xml new file mode 100644 index 0000000..e34d7d2 --- /dev/null +++ b/db/vfp9/datatypes.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/db/vfp9/output.xsl b/db/vfp9/output.xsl new file mode 100644 index 0000000..13fded4 --- /dev/null +++ b/db/vfp9/output.xsl @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LPARAMETERS teLongName, tcCommand + + * [teLongName] False: set llDbc=.F. and generates "FREE", Empty: generates without "FREE" and "NAME", otherwise generates "NAME teLongName" + + * [tcCommand] if used, &tcCommand command will run after CREATE TABLE + + + LOCAL llDbc, lcFreeOrName, lnIndex + + llDbc = VARTYPE( m.teLongName )=[C] + + * True not supported yet: Improve db\vfp9\output.xsl and remove "xsl:if test=[1=2]" from it + + lcFreeOrName = IIF( m.llDbc, IIF( EMPTY( m.teLongName ), [], [NAME "] + m.teLongName + ["] ), [FREE] ) + + lnIndex = IIF( VARTYPE( m.teIndex )=[L], 0, IIF( EMPTY( m.teIndex ), 1, 2 ) ) + + + + + + + + ERASE + + .dbf + + + ERASE + + .fpt + + + ERASE + + .cdx + + + ERASE + + .bak + + + ERASE + + .tbk + + + + + CREATE TABLE + + &lcFreeOrName + ( ; + + + + + + + + + + + NOT NULL + + + NULL + + + + AutoInc + + + + + + + + + + + COMMENT ' + + + + + + ' + + + + + , ; + + + + ; + + + + + + + + , + + + PRIMARY KEY ( + FULLTEXT KEY ( + UNIQUE KEY ( + KEY ( + + + + + + , + + + ) + + + + + ) + + + + + + COMMENT ' + + + + + + ' + + + ; + + + + + + + + IF NOT EMPTY( m.tcCommand ) + + &tcCommand + + ENDIF + + + + + + + + + + + + + ALTER TABLE + + ADD FOREIGN KEY ( + + ) REFERENCES + + ( + + ); + + + + + + + + + diff --git a/db/vfp9/readme_vfp9.txt b/db/vfp9/readme_vfp9.txt new file mode 100644 index 0000000..f70dc34 --- /dev/null +++ b/db/vfp9/readme_vfp9.txt @@ -0,0 +1,45 @@ +02.12.2009 + vfp9 add-on for WwwSQLDesigner + by zvolsky@seznam.cz + + +Installation: +------------- +Download and install WwwSQLDesigner from http://code.google.com/p/wwwsqldesigner/ +If there is no db\vfp9 folder, then continue: + +Unzip files into db\vfp9 folder of the WwwSQLDesigner. +If you don't see vfp9 in database type selection, copy db\vfp9\readme_vfp9\config.js into js\config.js location. +After changing js\config.js you must restart. +Changes in db\vfp9\output.xsl take effect immediately. +To re-read db\vfp9\datatypes.xml you must make some (dummy) change in js\config.js and restart. + + +WwwSQLDesigner basics: +---------------------- +To start click Index.html. +Never use Page Refresh (F5) - data will be lost! +Use Save button to generate FoxPro script with CREATE TABLEs. +Use Save/Read and Save XML buttons to generate XML and copy-paste it into text file to save your work. +Use Save/Read and Read XML buttons to continue work. + + +Use of VFP9 add-on: +------------------- +Textbox "Default" in Field adding has different meaning. Here you can enter all foxpro keywords, which follow field definition. +No word "DEFAULT" is added. To use some DEFAULT, write "DEFAULT value". If you let just "NULL" in Textbox "Default", +you will receive FoxPro error. Write "DEFAULT .NULL." if you want a default null value. + +Data type "Integer (not key)" differents just in its color (but generates standard Integer) + +Data types Binary aren't in list. They are supported through "Default" textbox. Write "NOCPTRANS" there. + + +There is (at this time - 02.12.2009) no support for .dbc (primary/foreign keys,..). +Plain CREATE TABLE commands are generated. + + +You can call VFP script with parameters. See generated script for details. +teLongName gives a possibility to genarate FREE or NAME keywords. +tcCommand can fire immediately after CREATE TABLE. +------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/js/config.js b/js/config.js index 016161b..0f20bf5 100644 --- a/js/config.js +++ b/js/config.js @@ -1,5 +1,5 @@ var CONFIG = { - AVAILABLE_DBS:["mysql","sqlite","web2py","mssql","postgresql"], + AVAILABLE_DBS:["mysql","sqlite","web2py","mssql","postgresql", "oracle", "sqlalchemy", "vfp9"], DEFAULT_DB:"mysql", AVAILABLE_LOCALES:["en","fr","de","cs","pl","pt_BR","es", "ru","eo"],