Commit Graph

40 Commits

Author SHA1 Message Date
kj
2f50532e13 refactor(Model): Type hint setNull variadic arguments 2025-10-10 21:06:11 -03:00
kj
b19e7d8789 Remove a forgotten debug line. 2025-09-07 18:52:33 -03:00
kj
4dfdb52519 Remove unnecessary and really never-used tableSufix property. 2025-09-07 15:25:48 -03:00
kj
b0891885f9 BREAKING CHANGE: Make select, from, and setNull methods variadic. 2025-09-07 15:20:06 -03:00
kj
b282d5479f Convert object/database naming conventions.
Adhere to PSR-12 by converting object properties to "lowerCamelCase" for objects
and "snake_case" for database interactions.

Backward compatibility is maintained: object properties already using
"snake_case" will continue to work without issue.
2025-09-07 15:01:45 -03:00
kj
c9f467345b BREAKING CHANGE: Adhere to PSR-12 coding standards.
- Model: where_in method was renamed as whereIn.
2025-09-07 11:07:07 -03:00
kj
0f46848d15 Remove the predefined 'id' property.
This property is not necessary and gives less flexibility.
2025-08-15 14:51:16 -03:00
kj
b2cb8d6883 Allow statically call beginTransaction, rollback and commit methods. 2025-07-15 18:12:41 -03:00
kj
e9126e7cde Fix: Implicitly marking parameter as nullable is deprecated.
PHP 8.4 deprecation.
2025-06-07 14:27:47 -03:00
kj
c8ab2aa2cc Remove unnecesary echo. 2025-05-20 12:49:20 -03:00
kj
d441f001ec Add type of items on array on dockblock for "all" method. 2025-02-03 16:04:39 -03:00
kj
19da122e05 Add type of items on array on dockblock for get method. 2025-02-03 16:02:27 -03:00
KJ
6aef212350 Fix className not returning the classname in the right format. 2024-10-25 10:40:57 -04:00
KJ
c600688725 Improve return array dockblocks. 2024-09-23 18:09:38 -04:00
KJ
3e27b1b7af Allow null on enum properties. 2024-09-23 15:06:44 -04:00
KJ
3d2a607768 Fix where_in is wiping previous where/and/or.
For now, works as an AND, but maybe later, same as where will exists
new methods: AndIn and OrIN.
2024-08-30 16:26:03 -04:00
KJ
df424ffab5 Model properties now can be typed as enums.
With this PHP 8.0 support is dropped.
2024-08-27 19:01:02 -04:00
KJ
05cd83fd10 Remove unused variable. 2024-07-31 03:29:49 -04:00
KJ
7beb161d2b Ensure db is in transaction to commit or rollback. 2024-06-04 07:18:30 -04:00
KJ
cd1685d2e7 fix on a docblock. 2024-05-21 15:06:02 -04:00
KJ
27b5ed6015 Convert model name from PascalCase to snake_case (table name). 2024-05-12 04:38:45 -04:00
KJ
f9b2c678f7 Support multiple databases at same time. 2024-05-12 03:47:09 -04:00
KJ
f5f803dde2 Reorganize code for PSR and others code prettify. 2024-05-09 15:13:52 -04:00
kj
d48f24ed98 Improve return types. 2023-04-22 05:32:37 -04:00
kj
b326c8e1d0 Fix mising use. 2023-04-16 23:47:49 -04:00
kj
1267d6b2f6 Fix deprecation warnings on PHP8.2 2023-04-15 13:17:00 -04:00
kj
06b7907f7c Define mixed type to param $id on getById method. 2023-03-25 21:28:25 -04:00
kj
4d052efba6 Change return type from mixed to ?Model on getFirts and getById methods. 2023-03-25 18:28:21 -04:00
kj
11141a0eee Allow send string to setNull method. 2023-03-25 12:27:33 -04:00
kj
3c8a21161f Add missing docblocks and return types. 2023-03-25 12:26:42 -04:00
kj
404bd59569 Improve where, and, or and search method.
- static::$querySelect['AndOr'] is REMOVED.
- where, and, or and search now use only the
  static::$querySelect['where'] index.
- removed unnecesary brackets on buildQuery.
2022-08-22 15:26:32 -04:00
kj
53bdc92344 Add bindValue method to Libs\Model. 2022-08-18 16:38:40 -04:00
kj
ad7b78f427 Fix prepare variables when special where/and/or columns. 2022-08-12 06:31:54 -04:00
kj
38d2a90318 Fix count when using joins. 2022-08-12 05:46:24 -04:00
kj
2411704662 Add sqlite support. 2022-08-04 05:30:22 -04:00
kj
08d92a2b81 Allow usage of bool types on the ORM. 2022-08-01 08:27:49 -04:00
kj
8d47e10d7a Fix resetQuery. 2022-07-29 22:23:07 -04:00
kj
c57ca191b1 Rename limit() variables with better names and add description. 2022-07-19 12:08:22 -04:00
kj
f4eabe6d54 Minor fixes.
- Add some uses.
- Fix typo and order error con docl block.
2022-07-14 22:39:38 -04:00
kj
0db6e4a021 rework to change from MySQLi to PDO. 2022-07-14 21:41:48 -04:00