New to version 2b2 ----------------------------------- Minor bug fixes and changes for portability. Corrected a problem when using an SQL view in a subselect. The view would not be properly updated and thus the subselect would have no data to work with. Enhanced the /! and /s commands to preserve the path when executing shell commands. This allows cd to work. See the Paths section in NOTES. Added quote level via command line option -E to control quoting when exporting a table via the command line option -e. Updated csv2shql to include updates to my AWK csv parser. Embedded newlines are now handled. Errors report the line the error occurred on and are redirected to STDERR. Added the options -N and -T for text to replace embedded newlines and tabs respectively. Added -n to set the number of columns output. This is handy if a csv file has a variable number of columns. Added 'AS LIST' to EDIT. This will convert the table to a list format similar to that used by NoSQL. After the editor quits the contents of the list file will replace the original table. Added APPEND which is similar to EDIT table AS LIST except it creates a list file with one blank record. Any new records in the list file are appended to the table. New to version 2b1 ----------------------------------- Many minor bugs and errors have been corrected. Much effort has been made to improve the interface. The prompt has changed, and is only present when interactive. Table and view listings are now formatted and more detailed. This may break any scripts that depended on the old format. Many new commands have been added. The way many commands operate has changed. The '/' is always required now. Statements may now end in ';', which has the same effect as '/g'. Command line options have been added and the handling of command line options has changed. See 'shql -h' for more information. The ALTER statement has been added. It can be used to rename a table/view. Add, delete, rename and change the type of a column in a table. If a table is altered and is uses by a view the view will be broken. No warning is generated, alter at your own risk. EDIT now edits the data file for the table. The command '\e table' now edits the header file for the table. With ALTER the old behavior should not longer be necessary. Functions have been added and can be nested. They depend on the version of AWK in use. See 'help functions' for more information. String handling is much different. Nothing inside a string will be modified unexpectedly. Backslashes "\" must be doubled because the shell always takes two and outputs one. To embed a double quote '"', backslash "\", dollar sign "$" or grave accent "`" in a double quoted string two back slash characters must be used, eg "Foo\\"Bar". Environment variables and grave accents "`" only work in double quoted strings. Inside single quoted strings the characters '"', "$" and "`" are not special. Overall strings should behave more like the do in sh. Note that multiple spaces are compressed into one space, this is beyond my control. Many SQL commands have been expanded. See help for more information. Columns now have types. Currently only char and int types are supported. When defining a column the normal type(width) syntax is now used. If the width is excluded it defaults to the length of the column name +2. Type checking is not performed, types only affect default sorting and display behavior. Header files must be updated, the new format is "Name\tTypeWidth". Simply add the type (char or int) before the width in each @ file or use the dump command line option. Views can now specify columns, and in a specific order, to use from the resulting join. You can now create vies using standard SQL syntax, eg "create view name as select * from table". These new views have their definition stored in files that end with #. See 'help create;' for the syntax. Existing views are unaffected. Added a dump command line option "-d". The SQL to recreate a database is output. The SQL that is output is designed to be read by shql, other databases will have problems with the double backslashes. Table definitions are output first, the table data second and then view definitions last. Views are listed by their last modification time in an attempt to prevent dependency problems. Be careful modifying view definition files, it can cause problems when attempting to restore a dump. The dump command properly handles databases from old versions of shql. This can be used to upgrade a database without having to edit the table header files. Added an export command line option "-e". This exports a table in CSV format. All fields are wrapped in double quotes and separated by commas. If a double quote appears in a field the double quote is escaped with a double quote, eg '"' becomes '""'. If * is given as the parameter to an aggregate it is internally replaced with the first column in the table. Thus count(*) acts as expected. Added the utility csv2shql to convert CSV files to shql specific SQL files. See csv2shql -h for more information. I reformatted the source and replaced indenting tabs with their space equivalents. I use VIM to edit. I also despise tabs in source. New to version 1.3 ----------------------------------- changed sed handling of sql statements for portability fixed count bug with -q(quiet) option New to version 1.2 ----------------------------------- changed sed script to allow spaces at the end of /g lines added backslash to sed script for portability New to version 1.2 ----------------------------------- fixed bug where -q option causes first row to always print fixed subselect bug on first row fixed bug with subselect's with where clauses fixed bug in multi-table joins New to version 1.1 ----------------------------------- Now runs under ksh as well as sh. Multi-table joins possible without creating views Aggregates now supported Looks in your $HOME/shql/ for database name also Execution operators are now '\' and '/',with '/' now possible the end of a line White-space is not required as it was before New -q option removes table headers, so only taking output that begins with '|' gets you all the data Delete syntax now requires a FROM, as it should have all along