Skip to content

Conversation

@mambax7
Copy link
Collaborator

@mambax7 mambax7 commented Sep 9, 2025

No description provided.

@mambax7 mambax7 requested a review from Copilot September 9, 2025 07:24

This comment was marked as outdated.

@mambax7 mambax7 requested a review from Copilot September 9, 2025 07:49

This comment was marked as outdated.

@mambax7 mambax7 requested a review from Copilot September 9, 2025 08:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds essential abstract methods to the XoopsDatabase class to standardize database error handling and query execution across different database drivers.

  • Introduces abstract methods for error handling (error(), errno())
  • Adds standardized query execution methods (query(), exec())
  • Provides backward compatibility through queryF() method and pagination helper

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mambax7 mambax7 merged commit 78063e2 into XOOPS:master Sep 9, 2025
4 checks passed
@XOOPS XOOPS deleted a comment from Copilot AI Sep 9, 2025
@GregMage
Copy link
Contributor

GregMage commented Sep 9, 2025

Since the update, there has been this error:
erreur: Fatal error: Class XoopsMySQLDatabaseSafe contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (XoopsDatabase::exec) in C:\wamp64\www\Xoops\XoopsCore25\htdocs\class\database\mysqldatabase.php on line 488

@mambax7
Copy link
Collaborator Author

mambax7 commented Sep 9, 2025

I'm resolving it as we speak, in #1572
Still doing some minor testing and I should finalize it in the next couple hours (hopefully)

@GregMage
Copy link
Contributor

GregMage commented Sep 9, 2025

Great, thank you!

@GregMage
Copy link
Contributor

GregMage commented Sep 9, 2025

In order to be able to work while waiting for the correction, I added:
public function exec($sql) { return $this->queryF($sql); }
in:
class XoopsMySQLDatabaseSafe extends XoopsMySQLDatabase and class XoopsMySQLDatabaseProxy extends XoopsMySQLDatabase

@mambax7
Copy link
Collaborator Author

mambax7 commented Sep 9, 2025

It's merged now, so please give it a try and let me know if you see any strange things and bugs!
Thanks!

@GregMage
Copy link
Contributor

GregMage commented Sep 9, 2025

Everything seems to be working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants