incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "first-leon@yandex.ru" <first-l...@yandex.ru>
Subject Database information from validate_doc_update
Date Sat, 09 Nov 2013 03:56:59 GMT
Hello.

Can I get information about the database as a function of 
validate_doc_update? For example, to find out the size of the database 
or the number of documents.

Example:
function(newDoc, oldDoc, userCtx) {
  if ( thisDb.disk_size > 1000 ) throw({forbidden : 'you have exceeded 
the limit'});
}

It is possible?

Thanks.

Mime
View raw message