Jump to content

More compatibility with remote databases


roc13x
 Share

Recommended Posts

I'm developing an application that heavily relies on manipulating tables on remote databases. ActiveRecord is compatible with this no problem, because of its db() function. But Nodes, not so much :(

\IPS\Node\Model and \IPS\Node\Controller would be a lot more compatible with situations like this if they called the ActiveRecord::db() function for queries, instead of \IPS\Db::i()

 

Link to comment
Share on other sites

5 minutes ago, roc13x said:

I'm developing an application that heavily relies on manipulating tables on remote databases. ActiveRecord is compatible with this no problem, because of its db() function. But Nodes, not so much :(

\IPS\Node\Model and \IPS\Node\Controller would be a lot more compatible with situations like this if they called the ActiveRecord::db() function for queries, instead of \IPS\Db::i()

You could simple extend the classes for your needs, than you wouldn't have the issues overall.

As example, I work also on a secondary database and wrote me simple extended classes for the ActiveRecord class:
https://github.com/Grief-Code/IPS-Stats/tree/master/sources/DbIntegration

They are used once again for my ActiveRecords then.
I also have a private repo where I continued the system, and have content items extended also.

Maybe this does help you getting some ideas :) 

Greetings

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...