Complete API Reference

Comprehensive documentation with examples for every method

This API reference provides detailed documentation for all AxioDB classes, methods, and operations. Each method includes type signatures, descriptions, practical examples, and return value specifications.

🚀 Getting Started

Start with AxioDB and Database sections

📝 CRUD Operations

See Insert, Query, Update, Delete sections

📊 Advanced

Explore Aggregation for complex data analysis

🔍 Query Operators Reference

Comparison

  • $gt - Greater than
  • $gte - Greater or equal
  • $lt - Less than
  • $lte - Less or equal
  • $ne - Not equal

Logical

  • $in - Match any value
  • $nin - Not in array
  • $and - All conditions
  • $or - Any condition

String

  • $regex - Pattern matching
  • $options - Regex flags (i, g)

📦 Response Interface Structure

Success Response

{
  statusCode: 200,
  status: 'success',
  message: 'Operation successful',
  data: { /* your data here */ }
}

Error Response

{
  statusCode: 400,
  status: 'error',
  message: 'Error description',
  error: { /* error details */ }
}

💡 Best Practices & Tips

  • Always use try-catch blocks for async operations
  • Use setProject() to limit returned fields for better performance
  • Enable schema validation for data integrity in production
  • Use setCount(true) instead of loading all docs when you only need the count
  • Place $match early in aggregation pipelines
  • Use documentId queries for fastest lookups
  • Enable encryption for sensitive data collections
  • Use insertMany() for bulk operations

ℹ️This API reference is continuously updated with the latest features. All methods return Promises and supportasync/awaitsyntax. For more examples and tutorials, check theUsage GuideandAdvanced Featuressections.