ใƒกใ‚คใƒณใ‚ณใƒณใƒ†ใƒณใƒ„ใพใงใ‚นใ‚ญใƒƒใƒ—
ใƒใƒผใ‚ธใƒงใƒณ: 0.7.0 (Previous)

๐Ÿ—„๏ธ Mongo Blocks

MongoDB blocks provide core database operations and utility functions for MongoDB collections in Nodeblocks applications. These blocks encapsulate common MongoDB patterns with standardized error handling and data normalization.


๐ŸŽฏ Overviewโ€‹

MongoDB blocks are designed to:

  • Provide database query operations with standardized functions for finding documents
  • Handle errors consistently with custom BlockError classes
  • Normalize data automatically by handling MongoDB-specific fields like _id
  • Ensure type safety with full TypeScript support
  • Enable composition for building complex database operations

๐Ÿ“ฆ Block Typesโ€‹

๐Ÿ”ง Blocksโ€‹

Pure business logic functions for MongoDB operations:

  • findResources: Retrieve multiple documents with error handling
  • buildWithoutMongoIdFindOptions: Create projection options to exclude _id

View Mongo Blocks โ†’