Do you have a gmail account by any chance? I can give you svn access
to check it in.
On Thu, Feb 14, 2008 at 9:01 PM, jm <[EMAIL PROTECTED]> wrote:
>
> This is a small patch against erlyweb-0.7 to add support for
>
> Model:table() ->
> none.
>
> meaning that you can now have models which do not need to have a table
> in the database for your model - it can be purely computational. This
> patch has not be rigorously tested, but seems to work for me.
>
> Jeff.
> --
>
> diff -aur ../erlyweb-0.7/src/erlydb/erlydb.erl erlyweb/src/erlydb/erlydb.erl
> --- ../erlyweb-0.7/src/erlydb/erlydb.erl Tue Dec 25 20:34:26 2007
> +++ erlyweb/src/erlydb/erlydb.erl Fri Feb 15 15:35:00 2008
> @@ -385,20 +385,25 @@
> {{module, Module},
> {pool_id, PoolId}}})
> end,
> -
> - case gb_trees:lookup(get_table(Module), TablesData) of
> - {value, Fields} ->
> - ?Debug("Generating code for ~w", [Module]),
> - Options2 = DriverOptions ++ Options,
> - MetaMod =
> - make_module(DriverMod, C2, Fields,
> - [{pool_id, PoolId} | Options2],
> - TablesData),
> - smerl:compile(MetaMod, Options);
> + ?Debug("get_table() -> ~p", [get_table(Module)]),
> + case get_table(Module) of
> none ->
> - exit(
> - {no_such_table, {{module, Module},
> - {table, get_table(Module)}}})
> + ok;
> + Tab ->
> + case gb_trees:lookup(Tab, TablesData) of
> + {value, Fields} ->
> + ?Debug("Generating code for ~w", [Module]),
> + Options2 = DriverOptions ++ Options,
> + MetaMod =
> + make_module(DriverMod, C2, Fields,
> + [{pool_id, PoolId} | Options2],
> + TablesData),
> + smerl:compile(MetaMod, Options);
> + none ->
> + exit(
> + {no_such_table, {{module, Module},
> + {table, get_table(Module)}}})
> + end
> end;
> Err ->
> Err
> <
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"erlyweb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---