| CODENOTIFIER | HelpYou are not signed inSign in |
Project: erlyweb
Revision: 219
Author: yarivvv
Date: 25 Dec 2007 00:01:49
Changes:Diff:| ... | ...@@ -1,3 +1,81 @@ | |
| 1 | v0.7 | |
| 2 | ||
| 3 | - Added support for multiple databases. More information is in the | |
| 4 | documentation. (yariv) | |
| 5 | ||
| 6 | - When a controller function returns a {replace, Ewc} tuple, ErlyWeb no longer | |
| 7 | treats Ewc as a sub-component if it's returned from a main component. | |
| 8 | This lets the component referred by Ewc to | |
| 9 | return any value that a main component function can return | |
| 10 | (e.g. phased_vars, ewr, etc). (yariv) | |
| 11 | ||
| 12 | - Set a 3-second threshold on auto compilation to avoid excessive | |
| 13 | directory scans when loading pages that trigger multiple requests | |
| 14 | (for example, due to img/script/css tags). (yariv) | |
| 15 | ||
| 16 | - Changed the arity of the 'phased' function to 3 from 2. ErlyWeb 0.7 expects | |
| 17 | the last parameter to be a list of variables passed from the controller | |
| 18 | function. The variables are passed using the {phased_vars, Vars} return | |
| 19 | value, e.g. | |
| 20 | ||
| 21 | index(A) -> | |
| 22 | {response, [{phased_vars, [{title, <<"sample page title">>}]}, | |
| 23 | {body, Body}]}. | |
| 24 | ||
| 25 | The app controller's hook/1 function can now be implemented as follows: | |
| 26 | ||
| 27 | hook(A) -> | |
| 28 | {phased, {ewc,A}, fun(Ewc, Data, PhasedVars) -> | |
| 29 | {ewc, html_container, [A, {data, Data}, | |
| 30 | proplists:get_value(title, PhasedVars)]}}. | |
| 31 | ||
| 32 | This tells ErlyWeb to pass the value of the 'title' property as the last | |
| 33 | parameter to html_container. (yariv) | |
| 34 | ||
| 35 | - Added the {last_compile_time, auto} compilation option, which tells ErlyWeb | |
| 36 | to only compile the files that have changed since the last compilation. | |
| 37 | (ketralnis) | |
| 38 | ||
| 39 | - Added an automatic check for the existence of expected foreign key fields | |
| 40 | in related modules during compilation. This can be disabled by adding the | |
| 41 | {skip_fk_checks, true} compilation option. (yariv) | |
| 42 | ||
| 43 | - erlydb_base:save() now avoids setting 'null' values of properties when | |
| 44 | executing INSERT statements. (yariv) | |
| 45 | ||
| 46 | - Added the ability to override the join table names and use aliases for | |
| 47 | related modules in many-to-many relations. E.g. | |
| 48 | ||
| 49 | person.erl: | |
| 50 | ||
| 51 | relations() -> | |
| 52 | [{many_to_many, | |
| 53 | [{painting, [{relation_table, creation_person}, | |
| 54 | {alias, creation}]}]}]. | |
| 55 | ||
| 56 | Then you can get the related paintings for a 'person' record as follows: | |
| 57 | ||
| 58 | person:creations(Person). | |
| 59 | ||
| 60 | This uses the 'creation_person' table to look up the related creations. (yariv) | |
| 61 | ||
| 62 | - {encoding, charset_atom} in Options list of erlydb:start/2 that turns on | |
| 63 | charset support over mysql connections. This allows us to support utf8, | |
| 64 | for example. The default is to have no explicit encoding spec at all | |
| 65 | (mysql server chooses latin1 by default.) (haoboy) | |
| 66 | ||
| 67 | - {pool_size, N} in Options list of erlydb:start/2 that starts N mysql | |
| 68 | processes in the process pool. The default value is to start only one. | |
| 69 | (haoboy) | |
| 70 | ||
| 71 | - erlyweb:create_component now takes options in the form of proplists, to | |
| 72 | allow choice between on/off for magic, model and ErlTL files. (cowmoo) | |
| 73 | ||
| 74 | - Added the {erlydb_timeout, Timout} compilation option to set the timeout | |
| 75 | for SQL queries (currently only works with MySQL). (yariv) | |
| 76 | ||
| 77 | - A bunch of bug fixes. (yariv) | |
| 78 | ||
| 1 | 79 | v0.6.2 |
| 2 | 80 | |
| 3 | 81 | - Fixed the app controller hook/1 return value handling, letting you return |