oasis_database library
My new Dart package
Classes
- BaseRepository
- Provides a foundational interface for all repositories in the system.
-
ConnectionManager<
C extends DatabaseConnector> -
ConnectionManageris 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
-
MySqlConnectoris a concrete implementation of theDatabaseConnectorinterface, tailored for establishing and managing connections with MySQL databases. This class uses themysql1package 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
DatabaseConnectorinterface. 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.