-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 19: Preparation for release of 1.0.0 #21
Conversation
The attachment size constraints (i.e. `attachmentConstraints.maximumIndividualSize`, `attachmentConstraints.maximumTotalSize` and the `attachmentReference` validation type's `maximumSize`) cannot be applied correctly to CouchDB documents due to a performance optimization that makes it impossible for a validation function to determine the size of an attachment as it is being created ([more info](apache/couchdb#1320)). The documentation has been updated to remove mention of the attachment size constraints, since they cannot be enforced. They will be removed from the code altogether in the future.
* `maximumAttachmentCount`: (optional) The maximum number of attachments that may be assigned to a single document of this type. In addition to a static value (e.g. `maximumAttachmentCount: 2`), this constraint may also be assigned a value dynamically via a function (e.g. `maximumAttachmentCount: function(newDoc, oldDoc) { ... }`) where the parameters are as follows: (1) the new document (if deleted, the `_deleted` property will be `true`) and (2) the document that is being replaced (if any; it will be `null` if it has been deleted or does not exist). Unlimited by default. | ||
* `maximumIndividualSize`: (optional) The maximum file size, in bytes, allowed for any single attachment assigned to a document of this type. In addition to a static value (e.g. `maximumIndividualSize: 256`), this constraint may also be assigned a value dynamically via a function (e.g. `maximumIndividualSize: function(newDoc, oldDoc) { ... }`) where the parameters are as follows: (1) the new document (if deleted, the `_deleted` property will be `true`) and (2) the document that is being replaced (if any; it will be `null` if it has been deleted or does not exist). Unlimited by default. | ||
* `maximumTotalSize`: (optional) The maximum total size, in bytes, of _all_ attachments assigned to a single document of this type. In other words, when the sizes of all of a document's attachments are added together, it must not exceed this value. In addition to a static value (e.g. `maximumTotalSize: 1024`), this constraint may also be assigned a value dynamically via a function (e.g. `maximumTotalSize: function(newDoc, oldDoc) { ... }`) where the parameters are as follows: (1) the new document (if deleted, the `_deleted` property will be `true`) and (2) the document that is being replaced (if any; it will be `null` if it has been deleted or does not exist). Unlimited by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The attachment size constraints (i.e. attachmentConstraints.maximumIndividualSize
, attachmentConstraints.maximumTotalSize
and the attachmentReference
validation type's maximumSize
) cannot be applied correctly to CouchDB documents due to a performance optimization that makes it impossible for a validation function to determine the size of an attachment as it is being created (more info). The documentation has been updated to remove mention of the attachment size constraints, since they cannot be enforced reliably. They will be removed from the code altogether in the future (see issue #22).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Updated the README to mention this limitation of couchster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -1,7 +1,7 @@ | |||
# Change Log | |||
This project adheres to [Semantic Versioning](http://semver.org/). All notable changes will be documented in this file. | |||
|
|||
## [Unreleased] | |||
## [1.0.0] - 2018-05-10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you'll wait until tomorrow to pull the trigger?
Description
Related Issue