96 lines
5.4 KiB
Org Mode
96 lines
5.4 KiB
Org Mode
* Sobre la actualización
|
|
Previamente, el sistema usaba [[https://www.php.net/mysqli][MySQLi]] para el Modelo/ORM, como actualización, se ha cambiado para funcionar con [[https://www.php.net/pdo][PDO]].
|
|
|
|
* Notas de migración
|
|
Estos son detalles importantes a tomar en cuenta a la hora de migrar del anterior ModelMySQL (MySQLi) al actual Model (PDO).
|
|
+ El modelo base ha cambiado de nombre de =ModelMySQL= a =Model=.
|
|
+ El método =query= ahora devuelve un =array= en lugar de un =mysqli_result=.
|
|
+ Se han depurado los métodos =sql_calc_found_rows= y =found_rows=.
|
|
+ Se ha cambiado =dbname=, =dbuser= y =dbpass= a =DB_NAME=, =DB_USER= y =DB_PASS=, respectivamente.
|
|
+ Se ha añadido la necesitad de la constante =DB_TYPE= para indicar el driver PDO a usar (ej. mysql, sqlite).
|
|
|
|
* Pruebas
|
|
|
|
En la siguiente tabla se encuentra la lista de estados de los SGBD que he probado (MySQL/MariaDB) o que planeo probar (sqlite3, postgreSQL) para asegurarme de que sean realmente compatibles.
|
|
|
|
*Entiéndase*:
|
|
|
|
+ *ok* como que ha sido probado y funciona.
|
|
+ En blanco como que no ha sido probado aún.
|
|
+ *error* como que fue probado, no funciona y no ha sido aún arreglado.
|
|
+ *not supported* como no soportado por el SGBD.
|
|
+ *fixed* para aquello que no existe, pero la librería lo traduce a un equivalente.
|
|
|
|
|------------------+---------------+---------+------------|
|
|
| method | MySQL/MariaDB | sqlite3 | postgreSQL |
|
|
|------------------+---------------+---------+------------|
|
|
| db | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| query | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| resetQuery | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| buildQuery | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| getInstance | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| getVars | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| className | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| table | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| update | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| beginTransaction | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| rollBack | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| commit | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| add | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| save | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| delete | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| select | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| from | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| where | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| where_in | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| leftJoin | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| rightJoin | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| innerJoin | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| and | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| or | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| groupBy | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| limit | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| orderBy | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| count | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| getById | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| search | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| get | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| getFirst | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| all | ok | | |
|
|
|------------------+---------------+---------+------------|
|
|
| setNull | ok | | |
|
|
|------------------+---------------+---------+------------|
|