Closed wehowski closed 2 years ago
I tested it. The "create table" statement will not work on Microsoft SQL Server, nor SQLite, Access and probably also PgSQL. Maybe we could make an interface to the database (sql slang) plugins to create tables? But then we would need to stick to very simple types (int, bool, string?) which exist on all supported DBMS
Hello Daniel, I know you are not a fan of frameworks and dependencies. But surely I have a Database favorite I like to show you, as it would be ONE File dependency: Its Meedo: https://medoo.in/api/new PHP must be >= 7.3, maybe you want to support 7.0 for OIDplus? But maybe you can get inspiration or fork the class, if the license allows it, to make it ready for OIDplus, rather to "reinvent the wheel"?
As for the table creation, I would suggest to provide install/upgrade/install plugin scripts in extra/admin processes. Plugins can define their tables in config files which the install/upgrade script reads (and "compiles"). That is how I did it in the previous version of the Frdlweb Framework.
Yes, I would like to keep PHP 7.0 compatibility as long as it is possible without too much effort or problems. I don't have problems with dependencies if they are so tiny, but I'd like to prevent frameworks.
Medoo sounds very interesting. But I'd only be interested in the "create table" part. Unfortunately, it doesn't seem to be right in my opnion: For example, take this example: https://medoo.in/api/create In their definition, they write "AUTO_INCREMENT", which is not valid for Microsoft SQL. So, it doesn't work. In this case, Medoo only takes care of the correct column and table quotes, but it does not abstract the types.
I would like to implement something similar, but my library should handle the types correctly. (e.g. I enter "BOOL" and it will be converted to "bit" for MSSQL, for example)
There is another one out there: https://www.doctrine-project.org/ Maybe this does what you mean by "abstraction". But it is big chunk of dependencies, probably too heavy.
The plugin does not use database anymore ( #10 ), therefore, there is no incompatibility with Microsoft SQL Server, PostgreSQL, etc. anymore
The idea of having a "create table" abstraction is listed in the TODO file of the OIDplus system
Therefore, closing this issue.
Check if the plugin works with Microsoft IIS and Microsoft SQL Server