Permalink
Browse files

fixed mysql connection functions, and added a proper configure file a…

…nd a make install script
  • Loading branch information...
1 parent fcd1453 commit 093a8f5830992865be751cd06b08f2002c3b26e6 yarivvv committed Oct 4, 2008
Showing with 25 additions and 22 deletions.
  1. +0 −10 Emakefile
  2. +4 −0 Makefile
  3. +12 −0 README.txt
  4. +8 −11 src/erlydb/erlydb_mysql.erl
  5. +1 −1 src/smerl/smerl.erl
View
@@ -1,10 +0,0 @@
-{"src/erlyweb/*", [debug_info, {outdir, "ebin"}, {i,"/opt/local/lib/yaws/include"}]}.
-%{"src/erlyweb/*", [debug_info, {outdir, "ebin"}, {i,"/Users/yariv/yaws/include"}]}.
-{"src/erlydb/*", [debug_info, {outdir, "ebin"}]}.
-{"src/erlsql/*", [debug_info, {outdir, "ebin"}]}.
-{"src/erltl/*", [debug_info, {outdir, "ebin"}]}.
-{"src/smerl/*", [debug_info, {outdir, "ebin"}]}.
-{"src/erlang-mysql-driver/*", [debug_info, {outdir, "ebin"}]}.
-{"src/erlang-psql-driver/*", [debug_info, strict_record_tests, {outdir, "ebin"}]}.
-{"src/lib/*", [debug_info, strict_record_tests, {outdir, "ebin"}]}.
-
View
@@ -9,6 +9,10 @@ docs:
-noshell
-run edoc_run application "'ErlyWeb'" '"."' '[no_packages]'
+install:
+
+ cp -r . `erl -noshell -eval 'io:format(code:lib_dir()).' -s erlang halt`/erlyweb-0.7.3
+
clean:
rm ebin/*.beam
View
@@ -4,3 +4,15 @@ Date: 10/27/2006
ErlyWeb is a web development framework for Erlang. It lets you quickly and easily build database-driven webapps following the MVC pattern.
For more information, visit http://erlyweb.org.
+
+
+=== Installation instructions ===
+
+In the ErlyWeb directory, execute
+
+./configure
+make
+sudo make install
+
+
+This assumes you have yaws installed under your Erlang lib directory (which you can find by calling code:lib_dir() in the Erlang shell).
@@ -98,33 +98,30 @@ start_link(Options) ->
start(Options, Fun, LinkConnections) ->
[PoolId, Hostname, Port, Username, Password, Database, LogFun,
- Encoding, PoolSize] =
+ Encoding, PoolSize, Reconnect] =
lists:foldl(
fun(Key, Acc) ->
[proplists:get_value(Key, Options) | Acc]
end, [],
lists:reverse([pool_id, hostname, port, username,
- password, database, logfun, encoding, poolsize])),
+ password, database, logfun, encoding, poolsize, reconnect])),
PoolId1 = if PoolId == undefined -> ?Epid; true -> PoolId end,
- PoolSize1 = if PoolSize == undefined ->
- 1;
- true ->
- PoolSize
- end,
+ PoolSize1 = if PoolSize == undefined -> 1; true -> PoolSize end,
Fun(PoolId1, Hostname, Port, Username, Password, Database, LogFun,
Encoding),
+ Reconnect1 = if Reconnect == undefined -> true; true -> Reconnect end,
make_connection(PoolSize1-1, PoolId, Database, Hostname, Port,
- Username, Password, Encoding, LinkConnections).
+ Username, Password, Encoding, Reconnect1, LinkConnections).
%% @doc Create a a number of database connections in the pool.
make_connection(PoolSize, PoolId, Database, Hostname, Port,
- Username, Password, Encoding, LinkConnections) ->
+ Username, Password, Encoding, Reconnect, LinkConnections) ->
if PoolSize > 0 ->
connect(PoolId, Hostname, Port, Username, Password, Database,
- Encoding, LinkConnections),
+ Encoding, Reconnect, LinkConnections),
make_connection(PoolSize-1, PoolId, Database, Hostname, Port,
- Username, Password, Encoding,
+ Username, Password, Encoding, Reconnect,
LinkConnections);
true ->
ok
View
@@ -580,7 +580,7 @@ compile(MetaMod, Options) ->
Forms1 = [{attribute, 1, file, {FileName, 1}} | Forms],
Forms2 = Forms1 ++ lists:reverse(MetaMod#meta_mod.forms),
-
+
case compile:forms(Forms2, Options) of
{ok, Module, Bin} ->
Res =

0 comments on commit 093a8f5

Please sign in to comment.