v0.5 - erlyweb:compile() now obey relative include paths passed as {i, Path} options. It treats the base directory as [AppDir]/src. Absolute paths also work now. - Fixed the SELECT statement generation for self-referencing many-to-many relations when find_related_many_to_many() includes a custom Where clause (this is a fix in erlsql.erl, which didn't add enough parens around the conditions). - Removed the if_saved() checks in erlydb_base.erl for the following functions: find_related_many_to_many(), aggregate_related_many_to_many(), find_related_many_to_one(), aggregate_related_many_to_one(), remove_related_many_to_many(), and delete(). This means these functions no longer call exit({no_such_record, Rec}) if is_new(Rec) returns true. - Changed the return value of erlydb_base:delete/1 to return the number of rows deleted. Previously, if the number of rows deleted was zero or greater than one, this function crashed. - Related to the last item, erlydb_base:after_delete/1 changed from "after_delete(Rec) -> ok." to "after_delete({Rec, NumDeleted}) -> NumDeleted.". - Fixed a bug in the accumulation of rendered iolists and other response elements for components having multiple subcomponents. - Fixed a bug in the auto-compilation feature causing an internal data-structure to grow indefinitely upon automatic recompilations. - Introduced a new return type, 'ewr', to redirect to the application's root url. - Introduced a new return type, {ewc, ControllerModule, ViewModule, Func, Params} to enable fine-grained control over ErlyWeb's rendering of components. - Exposed 2 new functions: erlyweb:get_ewc/2 and erlyweb:get_initial_ewc/2. These functions are useful primarily in the app controller for expanding an {ewc, A} tuple to its full representation, i.e. {ewc, ControllerModule, ViewModule, Func, Param}. - Optimized the generated code for mapping incoming requests and nested components to their controller/view modules. - Removed the before_return() and module_info() functions from the list of controller functions exposed to incoming requests. - Made a few internal optimizations. - Updated the documentation. - Removed support for app views and component views' render() function. Their functionality is now attained with containers. - Added the {phased, Ewc, Fun(ExpandedEwc, Data)} response tuple to the app controller to support conditional containers. - Refactored the compilation logic to a new file called 'erlyweb_compile.erl'. - Added the get_cookie/2 function to erlyweb_util. - Fixed the include paths support for files compiled with ErlyDB. - Added support for USING clauses in DELETE statmenets in ErlSQL - Added the remove_related_many_to_many_all function to erlydb_base together with new a few variants in generated modules. Some of those variants are capable of automatically generating proper USING clauses when provided WHERE expressions. - Added is_new/2 to erlydb_base. - erlydb_base:remove_related_many_to_many() and erlydb_base:add_related_many_to_many() now return NumRowsDeleted::integer() instead of 'ok' or crashing if the number of rows deleted isn't 1. - ErlTL enhacement: expressions in <% .. %> tags are now treated as a single block, which means you can write multiple expressions separated by commas and the value of the last expression will be returned. - Made a fix in the handling of nested calls to mysql:transaction() in the MySQL driver. - erlydb_base:add_related_many_to_many now accepts a list of related records to add in a single SQL statement for efficiency. - Made a fix in the handling of self-referencing many-to-many relations for tables with multiple primary keys. - Added the client_ip_port field to yaws_arg.erl. - Added the function erlydb_base:insert/1, which lets you insert a list of records into the database in a single statement. - Added erlydb_base:update/2 and erlydb_base:update/3 to simplify executing hand-crafted UPDATE statements against the model's table. - Added erlyweb_util:indexify/2 to translate requests such as "/foo/bar/" to "/foo/index/bar". - Added erlyweb_html:a/3, which adds additional attributes to anchor tags. - Removed support for {parens, Expr} in ErlSQL expressions. Instead, use {list, [Expr]}. - Added support for using complete expressions rather than just constants in the RHS of ErlSQL UPDATE statements. - Added compile_file/5 to the erlyweb_compile export list. - Added a default html field type to the 'decimal' data type in erlydb_field. - Optimized the code generated by smerl:embed_params() and smerl:curry(). - Updated the code generated by erlyweb:create_app() to use the new container approach involving phased rendering. - Made internal improvements in erlydb_base. - Added a few functions in mysql.erl to start the dispatcher without linking. - Added erlydb:start_link() and changed erlydb:start() to make it call mysql:start() instead of mysql:start_link(). This should prevent the MySQL dispatcher from dying every time the interactive shell traps an exit. Just remember to call erlydb:start_link() instead of erlydb_start() if you want to link to the MySQL dispatcher. - Created the 'erlyweb_forms' module, with a few functions useful for form POST processing. - Added support for the optional 'before_call/2' function in controllers. This function takes the name of the requested function and its parameters and returns {NewFucnName, NewParams}. - Made a couple of SQL statement generation fixes in erlsql.erl. v0.4.1 - Added compiler debug_info to ebin files. - Added a make script for Windows. - Fixed a bug that where ErlyDB was using module names instead of table names to construct queries for self-referencing many-to-many relations. - Fixed a bug preventing an ErlyDB module for defining a single field which is also the 'identity' primary key field. v0.4 - Added support for arbitrary primary key fields. ErlyDB now gets its primary key information from the database and everything 'just works.' Note that foreign key fields now have a more general naming convention: instead of [TableName]_id, they are called [TableName]_[PrimaryKeyField]. - Added support for self-referencing many-to-many relations. A module can now define a many-to-many relation to itself, and ErlyDB would use special database querying logic to handle this case. Relation tables in such scenarios have a different field naming convention. For more information, read the documentation at the top of erlydb.erl (it will be published when v0.4 is released). - Fix: Database updates in add_related_many_to_many() and remove_related_many_to_many() are now in done in transactions. - Fix: Foreign key field names and many-to-many relation table names are now derived from a module's database table's name, not the module's name (note: this only affects modules that override the table() function). - Fix: Proper handling of -include() directives in Smerl (Smerl now automatically searches the source file's directory for header files). - {ewr, Name} now triggers a redirect to the component with the given name, not the function with the given name in the same component. This is a more logical behavior (and it also matches the documentation :) ). - Fix: You can now use 'ewr' tuples in {response, Elems} - erlydb_field:extras/1 now returns 'undefined' instead of 'none'. - erlydb_field:key/1 now returns 'undefined' instead of 'none'. - In ErlyDB, functions ending with '_first' (e.g. language:projects_first(Erlang)), which return the first record of a related module, now return either the related record or 'undefined' instead of a list that may be empty or contain the one related record. This is to be consistent with the behavior of Module:find_first(). - Some functions in erlydb_base used to call exit({error, {no_such_record, Rec}}}) if they were passed a record(s) that hadn't been saved in the database. To be consistent with other errors, these functions now call exit({no_such_record, Rec}). - Fixed a documentation bug referring to 'allow_unsafe_sql' instead of 'allow_unsafe_statements' - Fixed a bug in where a call to Model:save/1 inside Model:transaction/1 would cause a crash when it results in an UPDATE statement. - Removed the "Skipping compilation of..." debug statement. - Made several documentation updates. - Updated the ErlyDB test code. - Added the debug_info flag to ErlyWeb app compilation. - Added a make script and a create app script. - Added the MySQL driver code as an external repository resource.