Erlang/OTP Forums

Author Message

<  Erlyweb mailing list  ~  erlyweb0.7 with mnesia

Guest
Posted: Wed Apr 23, 2008 3:12 pm Reply with quote
Guest
Hello,

I wanted to revamp an in-house web application I had created using
erlyweb. I decided to try the latest versions of erlang, yaws and
erlyweb but sadly found that the mnesia support and the test suite
(!?!?) were broken. The attached patch was made against the latest svn
trunk and addresses the following issues:

- ./src/erlydb/erlydb_mnesia.erl
- as of 0.7 get_metadata/1 should return just a Tree structure but
was still returning a {ok,Tree} tuple.

- test/erlydb/erlydb_test.erl
- in the call to erlydb:code_gen/3 the order of the first two
arguments changed between 0.6 and 0.7!
- re-ordered the arguments to some component creation functions
(i.e. component:new/x where x is the record field count)

It appears that from erlyweb 0.7 the order of the arguments for the
component:new/x functions does not necessarily match the order of the
fields in the mnesia tables -- they appear to be in the order returned
by component:db_fields() -- it would seem to be less fragile to use
the component:new_with/1 function and name the arguments explicitly.

I've only tested against a mnesia database so I don't know how the
argument reordering mentioned above will affect the test run with a
mysql database but it does now run successfully with mnesia.

Best Regards,
John


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---



Post recived from mailinglist
Guest
Posted: Mon May 05, 2008 3:18 am Reply with quote
Guest
Nice, thanks a lot. I've been maintaining only the MySQL driver and
unfortunately the Mnesia and Postgres drivers have fallen behind
somewhat. I appreciate the patch.

Yariv

On Wed, Apr 23, 2008 at 8:11 AM, John Webb <jwebb@gol.com> wrote:
> Hello,
>
> I wanted to revamp an in-house web application I had created using
> erlyweb. I decided to try the latest versions of erlang, yaws and
> erlyweb but sadly found that the mnesia support and the test suite
> (!?!?) were broken. The attached patch was made against the latest svn
> trunk and addresses the following issues:
>
> - ./src/erlydb/erlydb_mnesia.erl
> - as of 0.7 get_metadata/1 should return just a Tree structure but
> was still returning a {ok,Tree} tuple.
>
> - test/erlydb/erlydb_test.erl
> - in the call to erlydb:code_gen/3 the order of the first two
> arguments changed between 0.6 and 0.7!
> - re-ordered the arguments to some component creation functions
> (i.e. component:new/x where x is the record field count)
>
> It appears that from erlyweb 0.7 the order of the arguments for the
> component:new/x functions does not necessarily match the order of the
> fields in the mnesia tables -- they appear to be in the order returned
> by component:db_fields() -- it would seem to be less fragile to use
> the component:new_with/1 function and name the arguments explicitly.
>
> I've only tested against a mnesia database so I don't know how the
> argument reordering mentioned above will affect the test run with a
> mysql database but it does now run successfully with mnesia.
>
> Best Regards,
> John
>
>
> >
>
>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post received from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum