Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 114 lines (39 sloc) 2.421 kb
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
1
2
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
3 #Module unsplit_lib#
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
4 * [Description](#description)
5 * [Function Index](#index)
6 * [Function Details](#functions)
7
8
37b00547 »
2011-03-28 more docs, types and bug fixes
9 Predefined merge functions.
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
10
11
12
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
13 __Authors:__ : Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).<a name="description"></a>
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
14
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
15 ##Description##
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
16
17
18
19
37b00547 »
2011-03-28 more docs, types and bug fixes
20 This module implements a few merge functions that can be used.
21
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
22 <a name="index"></a>
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
23
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
24 ##Function Index##
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
25
26
37b00547 »
2011-03-28 more docs, types and bug fixes
27 <table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#bag-2">bag/2</a></td><td>Default <code>bag</code> merge; removes duplicate objects.</td></tr><tr><td valign="top"><a href="#last_modified-2">last_modified/2</a></td><td>Keeps the last modified object, based on the <code>modified</code> attribute.</td></tr><tr><td valign="top"><a href="#last_version-2">last_version/2</a></td><td>Picks the object with the greatest value of a given attribute.</td></tr><tr><td valign="top"><a href="#no_action-2">no_action/2</a></td><td>Minimal merge action - does nothing.</td></tr><tr><td valign="top"><a href="#vclock-2">vclock/2</a></td><td></td></tr></table>
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
28
29
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
30 <a name="functions"></a>
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
31
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
32 ##Function Details##
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
33
34 <a name="bag-2"></a>
35
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
36 ###bag/2##
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
37
38
39
37b00547 »
2011-03-28 more docs, types and bug fixes
40
41 <pre>bag(Objs::Phase, S0::State) -> <a href="#type-merge_ret">merge_ret()</a></pre>
42 <br></br>
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
43
44
45
46
37b00547 »
2011-03-28 more docs, types and bug fixes
47 Default `bag` merge; removes duplicate objects<a name="last_modified-2"></a>
48
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
49 ###last_modified/2##
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
50
51
52
37b00547 »
2011-03-28 more docs, types and bug fixes
53
54 <pre>last_modified(Other::Phase, S0::State) -> <a href="#type-merge_ret">merge_ret()</a></pre>
55 <br></br>
56
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
57
58
59
60
37b00547 »
2011-03-28 more docs, types and bug fixes
61
62 Keeps the last modified object, based on the `modified` attribute
63
64 This function assumes that the table to be merged contains objects with
65 a `modified` attribute.<a name="last_version-2"></a>
66
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
67 ###last_version/2##
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
68
69
70
37b00547 »
2011-03-28 more docs, types and bug fixes
71
72 <pre>last_version(Objs::Phase, S::State) -> <a href="#type-merge_ret">merge_ret()</a></pre>
73 <br></br>
74
75
76
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
77
78
79
37b00547 »
2011-03-28 more docs, types and bug fixes
80 Picks the object with the greatest value of a given attribute
81
82
83
84 This function assumes that an attribute name is passed as an extra argument.
85 e.g. by adding the following user property to the table:
86
87
88
89 `{unsplit_method, {unsplit_lib, last_version, [Attr]}}`
90
91 The function will choose the object that has the greatest value in the
92 position given by `Attr`.<a name="no_action-2"></a>
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
93
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
94 ###no_action/2##
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
95
96
97
98
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
99 <pre>no_action(X1::init, X2::State) -&gt; stop</pre>
37b00547 »
2011-03-28 more docs, types and bug fixes
100 <br></br>
101
102
103
104
105 Minimal merge action - does nothing<a name="vclock-2"></a>
106
7b821937 »
2012-01-22 use plain rebar ct to run CT suite
107 ###vclock/2##
37b00547 »
2011-03-28 more docs, types and bug fixes
108
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
109
110
111
37b00547 »
2011-03-28 more docs, types and bug fixes
112 `vclock(Objs, S) -> any()`
c1da1737 »
2011-03-23 Added some documentation + customizable fetch strategy
113
Something went wrong with that request. Please try again.