crud-node
  • ⚡Overview
  • ✨Installation
  • 🧰Schema (soon)
  • ☄️Quick Start
  • Guides
    • 🪄Guides (soon)
  • Adapters
    • 💫Adapters
      • Availability 🆕
      • MySQL
      • MySQLX
      • Mongo (soon)
      • Postgres (soon)
      • Cassandra (soon)
      • Oracle (soon)
      • SqlLite (soon)
      • Couchdb (soon)
  • Reference
    • ⭐API Reference
      • Availability 🆕
      • init
      • toString
      • createDocument
      • createDocumentIfNotExists 🆕
      • deleteDocument
      • deleteAll 🆕
      • updateDocument
      • getDocument
      • getDocuments
      • getDocumentByCriteria 🆕
      • searchDocumentsByCriteria 🆕
      • searchDocuments 🆕
      • groupByDocuments 🆕
      • filterDocumentsByCriteria 🆕
      • filterDocuments 🆕
      • filterDocumentsByIds 🆕
      • fetchAll 🆕
      • findDocument 🆕
      • existsDocument
      • getCount
      • getTotal
      • callStoredProcedure 🆕
  • 📃Changelog
  • 📋Roadmap
Powered by GitBook
On this page
  1. Reference
  2. API Reference

init

Creates a collection in the database, if collection does not exist

This method is available only for MySQL X Protocol (Document Store)

Signature

init(session: mysqlx.Session): Promise<void>;

Example

await db.usingSession(async (session) => {
  await employeeController.init(session);
});
PreviousAvailability 🆕NexttoString

Last updated 2 years ago

⭐