From 0d66208766000c58222b2ba471178fb956fc8f31 Mon Sep 17 00:00:00 2001 From: Boris 'billiob' Faure Date: Mon, 1 Nov 2010 22:13:45 +0100 Subject: remove '\011' from mnesia doc --- lib/mnesia/doc/src/Mnesia_chap2.xmlsrc | 6 +++--- lib/mnesia/doc/src/Mnesia_chap3.xml | 4 ++-- lib/mnesia/doc/src/Mnesia_chap5.xmlsrc | 18 +++++++++--------- lib/mnesia/doc/src/mnesia.xml | 14 +++++++------- 4 files changed, 21 insertions(+), 21 deletions(-) (limited to 'lib/mnesia/doc/src') diff --git a/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc index f263ea4ed2..2e2cc386b7 100644 --- a/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc +++ b/lib/mnesia/doc/src/Mnesia_chap2.xmlsrc @@ -551,7 +551,7 @@ In_proj stored in the database:

-\011  mnesia:select(employee, [{#employee{sex = female, name = '$1', _ = '_'},[], ['$1']}]).
+mnesia:select(employee, [{#employee{sex = female, name = '$1', _ = '_'},[], ['$1']}]).
         

Select must always run within an activity such as a transaction. To be able to call from the shell we might @@ -585,8 +585,8 @@ In_proj

           Q = qlc:q([E#employee.name || E  mnesia:table(employee),
-\011                                E#employee.sex == female]),
-\011  qlc:e(Q),
+                                E#employee.sex == female]),
+          qlc:e(Q),
         

Accessing mnesia tables from a QLC list comprehension must always be done within a transaction. Consider the following diff --git a/lib/mnesia/doc/src/Mnesia_chap3.xml b/lib/mnesia/doc/src/Mnesia_chap3.xml index c3e584123e..2db9af9cf7 100644 --- a/lib/mnesia/doc/src/Mnesia_chap3.xml +++ b/lib/mnesia/doc/src/Mnesia_chap3.xml @@ -418,8 +418,8 @@ skeppet %erl -sname b -mnesia dir '"/ldisc/scratch/Mnesia.company"'set and bag:

  f() -> F =  fun() ->
-\011      mnesia:write({foo, 1, 2}), mnesia:write({foo, 1, 3}),
-\011      mnesia:read({foo, 1}) end, mnesia:transaction(F).             
+ mnesia:write({foo, 1, 2}), mnesia:write({foo, 1, 3}), + mnesia:read({foo, 1}) end, mnesia:transaction(F).

This transaction will return the list [{foo,1,3}] if the foo table is of type set. However, list [{foo,1,2}, {foo,1,3}] will return if the table is diff --git a/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc index 1c7e3662e1..30a8991465 100644 --- a/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc +++ b/lib/mnesia/doc/src/Mnesia_chap5.xmlsrc @@ -335,7 +335,7 @@ ok explicitly be set at table creation. The default is 0, but if n_disc_copies and n_disc_only_copies also are 0, - n_ram_copies\011will default be set to 1. + n_ram_copies will default be set to 1.

{n_disc_copies, Int} @@ -408,7 +408,7 @@ ok (a@sam)4> SecProps = [{foreign_key, {prim_dict, sec_val}}]. [{foreign_key,{prim_dict,sec_val}}] (a@sam)5> mnesia:create_table(sec_dict, -\011 [{frag_properties, SecProps}, + [{frag_properties, SecProps}, (a@sam)5> {attributes, [sec_key, sec_val]}]). {atomic,ok} (a@sam)6> Write = fun(Rec) -> mnesia:write(Rec) end. @@ -418,23 +418,23 @@ ok (a@sam)8> SecKey = 42. 42 (a@sam)9> mnesia:activity(sync_dirty, Write, -\011\011 [{prim_dict, PrimKey, -11}], mnesia_frag). + [{prim_dict, PrimKey, -11}], mnesia_frag). ok (a@sam)10> mnesia:activity(sync_dirty, Write, -\011\011 [{sec_dict, SecKey, PrimKey}], mnesia_frag). + [{sec_dict, SecKey, PrimKey}], mnesia_frag). ok (a@sam)11> mnesia:change_table_frag(prim_dict, {add_frag, [node()]}). {atomic,ok} (a@sam)12> SecRead = fun(PrimKey, SecKey) -> -\011\011 mnesia:read({sec_dict, PrimKey}, SecKey, read) end. + mnesia:read({sec_dict, PrimKey}, SecKey, read) end. #Fun (a@sam)13> mnesia:activity(transaction, SecRead, -\011\011 [PrimKey, SecKey], mnesia_frag). + [PrimKey, SecKey], mnesia_frag). [{sec_dict,42,11}] (a@sam)14> Info = fun(Tab, Item) -> mnesia:table_info(Tab, Item) end. #Fun (a@sam)15> mnesia:activity(sync_dirty, Info, -\011\011 [prim_dict, frag_size], mnesia_frag). + [prim_dict, frag_size], mnesia_frag). [{prim_dict,0}, {prim_dict_frag2,0}, {prim_dict_frag3,0}, @@ -444,7 +444,7 @@ ok {prim_dict_frag7,0}, {prim_dict_frag8,0}] (a@sam)16> mnesia:activity(sync_dirty, Info, -\011\011 [sec_dict, frag_size], mnesia_frag). + [sec_dict, frag_size], mnesia_frag). [{sec_dict,0}, {sec_dict_frag2,0}, {sec_dict_frag3,0}, @@ -1051,7 +1051,7 @@ ok ActivityID will be received. Note that this event may still be received even if no table events with a corresponding ActivityID were received, depending on the tables to which the receiving process is subscribed.

-

Dirty operations always only contain one update and thus no activity event is sent.

+

Dirty operations always only contain one update and thus no activity event is sent.

diff --git a/lib/mnesia/doc/src/mnesia.xml b/lib/mnesia/doc/src/mnesia.xml index 74486b32bd..30adc0f071 100644 --- a/lib/mnesia/doc/src/mnesia.xml +++ b/lib/mnesia/doc/src/mnesia.xml @@ -799,7 +799,7 @@ mnesia:change_table_copy_type(person, node(), disc_copies)

{local_content, Bool}, where Bool must be - either true or false. The default value is false.\011

+ either true or false. The default value is false.

For example, the following call creates the person table @@ -1067,7 +1067,7 @@ mnesia:create_table(person, mnesia:dirty_next/2 but returns the previous object in Erlang term order for the ordered_set table type. For all other table types, mnesia:dirty_next/2 and - mnesia:dirty_prev/2 are synonyms.\011

+ mnesia:dirty_prev/2 are synonyms.

@@ -1702,7 +1702,7 @@ mnesia:create_table(person, mnesia:next/2 but returns the previous object in Erlang term order for the ordered_set table type. For all other table types, mnesia:next/2 and - mnesia:prev/2 are synonyms.\011

+ mnesia:prev/2 are synonyms.

@@ -1891,10 +1891,10 @@ mnesia:create_table(person,

For example to find the names of all male persons with an age over 30 in table Tab do:

-\011 MatchHead = #person{name='$1', sex=male, age='$2', _='_'}, -\011 Guard = {'>', '$2', 30}, -\011 Result = '$1', -\011 mnesia:select(Tab,[{MatchHead, [Guard], [Result]}]), +MatchHead = #person{name='$1', sex=male, age='$2', _='_'}, +Guard = {'>', '$2', 30}, +Result = '$1', +mnesia:select(Tab,[{MatchHead, [Guard], [Result]}]),
-- cgit v1.2.3