Is your feature request related to a problem? Please describe.
UserHideRepository, UserInterestRepository, and UserRepository contains MariaDB/MySQL specific SQL queries. This makes is difficult to adapt Alovoa to other database platforms, e.g. PostgreSql.
Problem may be solved by moving that queries into stored functions, so Alovoa code @Query needs a simple select call, only. An init interface and its implementations for each supported database platform is needed to set up stored functions if a new Alovoa installation is started for the first time.
Describe the solution you'd like
Classes mentioned above should be adapted for use of stored functions.
In a first step an initSql interface should be defined and an implementation of that interface should set up required stored functions for MariaDB/MySQL.
For each class it should be possible to use different databases, especially for classes regarding binary blobs.
According to application.properties the right implementation is selected for used database.
Describe alternatives you've considered
Unfortunately @Query cannot parametrized at runtime, so that is not an option to select a @Query based on application.properties.
Additional context
This feature may be also useful if Alovoa is considered to be used on high volume installations, because it opens the possibility to use distributed databases and even some types of NoSQL databases like Apache Cassandra. This would be useful for e.g. big binary blobs like images or videos.
If you need help to implement this, please let me know.
Is your feature request related to a problem? Please describe. UserHideRepository, UserInterestRepository, and UserRepository contains MariaDB/MySQL specific SQL queries. This makes is difficult to adapt Alovoa to other database platforms, e.g. PostgreSql. Problem may be solved by moving that queries into stored functions, so Alovoa code
@Query
needs a simple select call, only. An init interface and its implementations for each supported database platform is needed to set up stored functions if a new Alovoa installation is started for the first time.Describe the solution you'd like
According to application.properties the right implementation is selected for used database.
Describe alternatives you've considered Unfortunately
@Query
cannot parametrized at runtime, so that is not an option to select a@Query
based on application.properties.Additional context This feature may be also useful if Alovoa is considered to be used on high volume installations, because it opens the possibility to use distributed databases and even some types of NoSQL databases like Apache Cassandra. This would be useful for e.g. big binary blobs like images or videos.
If you need help to implement this, please let me know.