1% Licensed under the Apache License, Version 2.0 (the "License"); you may not
2% use this file except in compliance with the License. You may obtain a copy of
3% the License at
4%
5%   http://www.apache.org/licenses/LICENSE-2.0
6%
7% Unless required by applicable law or agreed to in writing, software
8% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10% License for the specific language governing permissions and limitations under
11% the License.
12
13-record(mrst, {
14    sig=nil,
15    fd=nil,
16    fd_monitor,
17    db_name,
18    idx_name,
19    language,
20    design_opts=[],
21    partitioned=false,
22    lib,
23    views,
24    id_btree=nil,
25    update_seq=0,
26    purge_seq=0,
27    first_build,
28    partial_resp_pid,
29    doc_acc,
30    doc_queue,
31    write_queue,
32    qserver=nil
33}).
34
35
36-record(mrview, {
37    id_num,
38    update_seq=0,
39    purge_seq=0,
40    map_names=[],
41    reduce_funs=[],
42    def,
43    btree=nil,
44    options=[]
45}).
46
47
48-record(mrheader, {
49    seq=0,
50    purge_seq=0,
51    id_btree_state=nil,
52    view_states=nil
53}).
54
55-define(MAX_VIEW_LIMIT, 16#10000000).
56
57-record(mrargs, {
58    view_type,
59    reduce,
60
61    preflight_fun,
62
63    start_key,
64    start_key_docid,
65    end_key,
66    end_key_docid,
67    keys,
68
69    direction = fwd,
70    limit = ?MAX_VIEW_LIMIT,
71    skip = 0,
72    group_level = 0,
73    group = undefined,
74    stable = false,
75    update = true,
76    multi_get = false,
77    inclusive_end = true,
78    include_docs = false,
79    doc_options = [],
80    update_seq=false,
81    conflicts,
82    callback,
83    sorted = true,
84    extra = []
85}).
86
87-record(vacc, {
88    db,
89    req,
90    resp,
91    prepend,
92    etag,
93    should_close = false,
94    buffer = [],
95    bufsize = 0,
96    threshold = 1490,
97    row_sent = false,
98    meta_sent = false
99}).
100
101-record(lacc, {
102    db,
103    req,
104    resp,
105    qserver,
106    lname,
107    etag,
108    code,
109    headers
110}).
111