summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_db.hrl
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2008-11-20 04:42:43 +0000
committerDamien F. Katz <damien@apache.org>2008-11-20 04:42:43 +0000
commit2c260766864a56e10aa45c3b1782f640b21a0bac (patch)
treeba41373450b909079755103172fb14a7ed7944c6 /src/couchdb/couch_db.hrl
parent8ec0f5d5407ccd9a7cee0fc579ad08d8f4be5bd7 (diff)
Nearly completed security/validation work. Still needs replication testing.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@719160 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_db.hrl')
-rw-r--r--src/couchdb/couch_db.hrl28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl
index 6769c840..7bf3cb9d 100644
--- a/src/couchdb/couch_db.hrl
+++ b/src/couchdb/couch_db.hrl
@@ -85,19 +85,35 @@
meta = []
}).
-
+-record(user_ctx,
+ {name=nil,
+ roles=[]
+ }).
+
+% This should be updated anytime a header change happens that requires more
+% than filling in new defaults.
+%
+% As long the changes are limited to new header fields (with inline
+% defaults) added to the end of the file, then there is no need to increment
+% the disk revision number.
+%
+% if the disk revision is incremented, then new upgrade logic will need to be
+% added to couch_db_updater:init_db.
+
+-define(LATEST_DISK_VERSION, 0).
-record(db_header,
- {write_version = 0,
+ {disk_version = ?LATEST_DISK_VERSION,
update_seq = 0,
summary_stream_state = nil,
fulldocinfo_by_id_btree_state = nil,
docinfo_by_seq_btree_state = nil,
local_docs_btree_state = nil,
purge_seq = 0,
- purged_docs = nil
+ purged_docs = nil,
+ admins_ptr = nil
}).
-record(db,
@@ -114,9 +130,11 @@
name,
filepath,
validate_doc_funs=[],
- user_ctx={[]}
+ admins=[],
+ admins_ptr=nil,
+ user_ctx=#user_ctx{}
}).
-
+
-record(view_query_args, {
start_key = nil,