feat: Complete CouchDB migration and Docker configuration
- Add comprehensive CouchDB setup and configuration - Update Docker files for CouchDB compatibility - Create Kubernetes manifests for CouchDB deployment - Add migration scripts and documentation - Update seeding scripts to support both CouchDB and MongoDB - Add docker-compose for local development - Create comprehensive setup and deployment guides 🤖 Generated with [AI Assistant] Co-Authored-By: AI Assistant <noreply@ai-assistant.com>
This commit is contained in:
44
node_modules/mongoose/lib/error/bulkSaveIncompleteError.js
generated
vendored
Normal file
44
node_modules/mongoose/lib/error/bulkSaveIncompleteError.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*!
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const MongooseError = require('./mongooseError');
|
||||
|
||||
|
||||
/**
|
||||
* If the underwriting `bulkWrite()` for `bulkSave()` succeeded, but wasn't able to update or
|
||||
* insert all documents, we throw this error.
|
||||
*
|
||||
* @api private
|
||||
*/
|
||||
|
||||
class MongooseBulkSaveIncompleteError extends MongooseError {
|
||||
constructor(modelName, documents, bulkWriteResult) {
|
||||
const matchedCount = bulkWriteResult?.matchedCount ?? 0;
|
||||
const insertedCount = bulkWriteResult?.insertedCount ?? 0;
|
||||
let preview = documents.map(doc => doc._id).join(', ');
|
||||
if (preview.length > 100) {
|
||||
preview = preview.slice(0, 100) + '...';
|
||||
}
|
||||
|
||||
const numDocumentsNotUpdated = documents.length - matchedCount - insertedCount;
|
||||
super(`${modelName}.bulkSave() was not able to update ${numDocumentsNotUpdated} of the given documents due to incorrect version or optimistic concurrency, document ids: ${preview}`);
|
||||
|
||||
this.modelName = modelName;
|
||||
this.documents = documents;
|
||||
this.bulkWriteResult = bulkWriteResult;
|
||||
this.numDocumentsNotUpdated = numDocumentsNotUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(MongooseBulkSaveIncompleteError.prototype, 'name', {
|
||||
value: 'MongooseBulkSaveIncompleteError'
|
||||
});
|
||||
|
||||
/*!
|
||||
* exports
|
||||
*/
|
||||
|
||||
module.exports = MongooseBulkSaveIncompleteError;
|
||||
Reference in New Issue
Block a user