The erlydb.erl is complaining that the filename we pass as a invalid
module
debug:erlydb:405: Error: {error,{invalid_module,
[116,101,115,116,46,101,114,108]}}
debug:erlydb:364: calling gen_module_code
[116,101,115,116,46,101,114,108]
btw..
in erlydb.erl at line 404
Err -
>
Err
i guess we need a debug statement ?
On Jun 17, 5:01 pm, db <[EMAIL PROTECTED]> wrote:
> Absolute path to the file doesn't work either. Here is my table def:
>
> CREATE TABLE `simple` (
>
> `id` int(11) NOT NULL AUTO_INCREMENT,
> `username` varchar(200) NOT NULL,
>
> PRIMARY KEY (`id`)
>
> ) ENGINE=Innodb DEFAULT CHARSET=latin1;
>
> 11> erlydb:code_gen(["/home/db/project1/src/simple_test.erl"],{mysql,
> [{allow_unsafe_statements, true}]}, [debug_info]).
> mysql_conn:426: fetch <<"show tables">> (id <0.81.0>)
> mysql_conn:426: fetch <<"describe simple">> (id <0.81.0>)
> debug:erlydb:355:
>
> --- To skip foreign key checks, compile with the {skip_fk_checks,
> true} option
>
> ok
>
> On Jun 15, 12:39 am, "Yariv Sadan" <[EMAIL PROTECTED]> wrote:
>
> > Try to pass the absolute path to "simple.erl" to code_gen(). Does that work?
>
> > On Mon, Jun 9, 2008 at 12:20 PM, db <[EMAIL PROTECTED]> wrote:
>
> > > Mysql database is running and has a schema simple with table simple.
> > > Started erlydb like here:
>
> > > erlydb:start(mysql, [{hostname, "localhost"}, {username, "simple"},
> > > {password, "12345"}, {database, "simple"}, {pool_size, 10}]).
>
> > > Not sure why I don't get the mysql table abstraction file(simple.erl)
> > > when I execute the following. Also there aren't any error
> > > messages/logs to look into:
>
> > > 3> erlydb:code_gen(["simple.erl"], mysql).
> > > mysql_conn:426: fetch <<"show tables">> (id <0.81.0>)
> > > mysql_conn:426: fetch <<"describe simple">> (id <0.81.0>)
> > > debug:erlydb:355:
>
> > > --- To skip foreign key checks, compile with the {skip_fk_checks, true}
> > > option
>
> > > --
> > > rk
>
> > > That which we persist in doing becomes easier for us to do; not that
> > > the nature of the thing itself is changed, but that our power to do is
> > > increased.
> > > -Ralph Waldo Emerson
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---