Database Overview
Loopar uses Sequelize ORM (version 7) as its database abstraction layer, providing a robust and flexible way to interact with multiple database systems.Supported Databases
Loopar supports the following database systems out of the box:MySQL
Production-ready relational database
MariaDB
MySQL-compatible open source database
SQLite
Lightweight file-based database
Database Configuration
Database configuration is stored indb.config.json and managed through the loopar instance:
packages/loopar/core/loopar.js
Configuration Options
Database type:
mysql, mariadb, or sqliteDatabase host (not required for SQLite)
Database port (default: 3306 for MySQL/MariaDB)
Database name
Database username (not required for SQLite)
Database password (not required for SQLite)
Database Initialization
The database connection is initialized automatically when Loopar starts:packages/loopar/core/loopar.js
Database Dependencies
Loopar uses the following packages for database connectivity:packages/db-env/package.json
Table Naming Convention
All database tables in Loopar are prefixed withtbl by default:
Transactions
Loopar supports database transactions for atomic operations:Next Steps
Models
Learn how to define database models
Queries
Query data using the ORM
Migrations
Manage schema changes