oasis_database library

My new Dart package

Classes

BaseRepository
Provides a foundational interface for all repositories in the system.
ConnectionManager<C extends DatabaseConnector>
ConnectionManager is responsible for managing database connections. It uses the Singleton pattern to ensure only one instance exists throughout the lifecycle of the application.
DatabaseConnector
An interface defining essential operations that any database connector must implement.
MySqlConnector
MySqlConnector is a concrete implementation of the DatabaseConnector interface, tailored for establishing and managing connections with MySQL databases. This class uses the mysql1 package to interact with the MySQL database.
MySqlRepository
OasisSchema<T>
Abstract class representing the schema of a given model T. It provides essential definitions related to table names, keys, lifecycle hooks, and utility methods for converting between the model and a map representation.
PostgresConnector
Represents a connector for PostgreSQL databases, implementing the DatabaseConnector interface. This class provides methods for opening, closing, querying, and managing transactions within a PostgreSQL database using the provided configuration.
PostgresRepository
QueryBuilder
A helper class to construct SQL queries based on the specific dialect. This class abstracts the common tasks of building SQL queries, allowing a consistent interface while adapting to different SQL dialects.

Enums

KeyType
Represents the type of primary key for the model. It can either be a single primary key or a composite key.