• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI4 Db

#1
Can I extend the ci4 db classes??
Reply

#2
Theoretically, yes, though it could get pretty tricky now that I think about it. What are you trying to do?
Reply

#3
I want alert the aggregator methods and also add new methods to suit my project.
Reply

#4
Adding methods is probably better done in a new base Model class, I would think.

As for anything more complex, I think you'll basically have to setup an entire set of Handlers, like you were setting up a new database the system knew about. That would include Builder, Connection, Forge, PreparedQuery, and Result classes. Each of those would just extend the MySQLi or Postgre files, per your need. This is needed, unfortunately, due to the way that class files are loaded within the database system. Kind of a pain, and probably something that needs to be looked into at some point.
Reply

#5
??? what I intend, is not expected to be restrictive to model only. And an entirely new handler, that's pained. I would have to modify session class and others where db is used..
Reply

#6
(07-15-2018, 09:32 PM)kilishan Wrote: Kind of a pain, and probably something that needs to be looked into at some point.

yes it does. While looking at the database classes yesterday, the configuration implementation isn't fair. I understand the point if trying to use Database:::connect, Database::forge etc else it would have been cul adding it to the services.
Reply

#7
(07-15-2018, 10:30 PM)scalla Wrote: yes it does. While looking at the database classes yesterday, the configuration implementation isn't fair. I understand the point if trying to use Database:::connect, Database::forge etc else it would have been cul adding it to the services.

Not sure I understand what you mean. How is the implementation "not fair"?
Reply

#8
I mean the /config/Database, if it were just Services:Big Grinatabase, it would be easy
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.