| Author |
Message |
|
| Guest |
Posted: Wed Dec 03, 2008 5:30 pm |
|
|
|
Guest
|
Hi.
erlydb_mnesia:get_metadata current code throws an error.
Please review and apply the following patch.
thanks, michael.
======
diff --git a/src/erlydb/erlydb_mnesia.erl b/src/erlydb/
erlydb_mnesia.erl
index bd7a136..54a66bb 100644
--- a/src/erlydb/erlydb_mnesia.erl
+++ b/src/erlydb/erlydb_mnesia.erl
@@ -184,11 +184,10 @@ start(_Options) ->
get_metadata(_Options) ->
% NOTE Integration with mnesia_rdbms would be interesting...
Tables = mnesia:system_info(tables) -- [schema],
- Tree = lists:foldl(
- fun(Table, TablesTree) ->
- gb_trees:enter(Table, get_metadata(Table, table_fields
(Table)), TablesTree)
- end, gb_trees:empty(), Tables),
- {ok, Tree}.
+ lists:foldl(
+ fun(Table, TablesTree) ->
+ gb_trees:enter(Table, get_metadata(Table, table_fields
(Table)), TablesTree)
+ end, gb_trees:empty(), Tables).
get_metadata(Table, Fields) when is_list(Fields) ->
[get_metadata(Table, Field) || Field <- Fields];
@@ -356,6 +355,7 @@ select(Modifier, Fields, Tables, WhereExpr,
Extras, Options, QHDesc) ->
end,
QLC1 = QLC ++ " || " ++ comma(Desc#qhdesc.generators ++ lists:reverse
(Desc#qhdesc.filters)) ++ "].",
?L(["About to execute QLC: ", QLC1]),
+ ?L(["With bindings : ", Desc#qhdesc.bindings]),
{atomic, Results} = transaction(
fun() ->
QHOptions = Desc#qhdesc.options,
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
| Guest |
Posted: Thu Dec 04, 2008 11:01 pm |
|
|
|
Guest
|
+1.
I'd like to see this fix included, please.
-jw
On Dec 4, 2008, at 2:29 AM, Michael Mullis wrote:
>
> Hi.
> erlydb_mnesia:get_metadata current code throws an error.
> Please review and apply the following patch.
> thanks, michael.
> ======
>
> diff --git a/src/erlydb/erlydb_mnesia.erl b/src/erlydb/
> erlydb_mnesia.erl
> index bd7a136..54a66bb 100644
> --- a/src/erlydb/erlydb_mnesia.erl
> +++ b/src/erlydb/erlydb_mnesia.erl
> @@ -184,11 +184,10 @@ start(_Options) ->
> get_metadata(_Options) ->
> % NOTE Integration with mnesia_rdbms would be interesting...
> Tables = mnesia:system_info(tables) -- [schema],
> - Tree = lists:foldl(
> - fun(Table, TablesTree) ->
> - gb_trees:enter(Table, get_metadata(Table, table_fields
> (Table)), TablesTree)
> - end, gb_trees:empty(), Tables),
> - {ok, Tree}.
> + lists:foldl(
> + fun(Table, TablesTree) ->
> + gb_trees:enter(Table, get_metadata(Table, table_fields
> (Table)), TablesTree)
> + end, gb_trees:empty(), Tables).
>
> get_metadata(Table, Fields) when is_list(Fields) ->
> [get_metadata(Table, Field) || Field <- Fields];
> @@ -356,6 +355,7 @@ select(Modifier, Fields, Tables, WhereExpr,
> Extras, Options, QHDesc) ->
> end,
> QLC1 = QLC ++ " || " ++ comma(Desc#qhdesc.generators ++ lists:reverse
> (Desc#qhdesc.filters)) ++ "].",
> ?L(["About to execute QLC: ", QLC1]),
> + ?L(["With bindings : ", Desc#qhdesc.bindings]),
> {atomic, Results} = transaction(
> fun() ->
> QHOptions = Desc#qhdesc.options,
>
> >
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
| Guest |
Posted: Tue Dec 09, 2008 3:49 am |
|
|
|
Guest
|
will do
On Thu, Dec 4, 2008 at 2:55 PM, John Webb <jwebb@gol.com> wrote:
>
> +1.
>
> I'd like to see this fix included, please.
>
> -jw
>
> On Dec 4, 2008, at 2:29 AM, Michael Mullis wrote:
>
>>
>> Hi.
>> erlydb_mnesia:get_metadata current code throws an error.
>> Please review and apply the following patch.
>> thanks, michael.
>> ======
>>
>> diff --git a/src/erlydb/erlydb_mnesia.erl b/src/erlydb/
>> erlydb_mnesia.erl
>> index bd7a136..54a66bb 100644
>> --- a/src/erlydb/erlydb_mnesia.erl
>> +++ b/src/erlydb/erlydb_mnesia.erl
>> @@ -184,11 +184,10 @@ start(_Options) ->
>> get_metadata(_Options) ->
>> % NOTE Integration with mnesia_rdbms would be interesting...
>> Tables = mnesia:system_info(tables) -- [schema],
>> - Tree = lists:foldl(
>> - fun(Table, TablesTree) ->
>> - gb_trees:enter(Table, get_metadata(Table, table_fields
>> (Table)), TablesTree)
>> - end, gb_trees:empty(), Tables),
>> - {ok, Tree}.
>> + lists:foldl(
>> + fun(Table, TablesTree) ->
>> + gb_trees:enter(Table, get_metadata(Table, table_fields
>> (Table)), TablesTree)
>> + end, gb_trees:empty(), Tables).
>>
>> get_metadata(Table, Fields) when is_list(Fields) ->
>> [get_metadata(Table, Field) || Field <- Fields];
>> @@ -356,6 +355,7 @@ select(Modifier, Fields, Tables, WhereExpr,
>> Extras, Options, QHDesc) ->
>> end,
>> QLC1 = QLC ++ " || " ++ comma(Desc#qhdesc.generators ++ lists:reverse
>> (Desc#qhdesc.filters)) ++ "].",
>> ?L(["About to execute QLC: ", QLC1]),
>> + ?L(["With bindings : ", Desc#qhdesc.bindings]),
>> {atomic, Results} = transaction(
>> fun() ->
>> QHOptions = Desc#qhdesc.options,
>>
>> >
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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 |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|