41
irmtfan
Re: Making a PDO "plugin" for 2.5.5 to potentially include in 2.6
  • 2013/5/3 2:40

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Quote:

it would be nice to have Criteria being able to create other type of queries besides SELECT, like INSERT, UPDATE and DELETE.

Now we have facilities for DELETE, UPDATE, INSERT in class/model
but they are general usage. (search for them and you will find)
After more investigation I think general usage is good and enough. ( but we can add some little and enhance it)
If someone like me want especial queries he can use $db but without hard-coded table.
eg in the current system you should use your object handler extended from XoopsPersistableObjectHandler:
$sql = ...
$result $this->db->query($sql$limit$start);

so the above will be executed on my object table.

42
redheadedrod
Re: Making a PDO "plugin" for 2.5.5 to potentially include in 2.6

Are you talking about in my PDO code or in the core code? I haven't looked very deep into the 2.6 connector yet to see what all has been changed or added. When I started this PDO connector 2.6 was pre-alpha 1 and I had not seen the connector. The ONLY thing I have added from the 2.6 connector at this point is the visibility keywords.

As of this writing I am DONE with my classes other than 2 final exams and 1 final project. My final project is on Neural networks so should be interesting and hopefully will be done today. I expect to get back to this connector as it looks now within the week depending on how much "wind down" time I need from this hectic semester. My finals are on Monday and Tuesday and my final project is due on Thursday but going to try and finish it today and tomorrow.






43
redheadedrod
Re: Making a PDO "plugin" for 2.5.5 to potentially include in 2.6

Today I am going to look extensively at the threads about things to add to the PDO connector I have been doing. I will be posting about the items I have working and the items I have found to add. My goal is to have a long programming session this weekend to accomplish finishing this connector. I will also take an extensive look through the 2.6 database connector to make sure this is primed to work with 2.6 with minimal modification. I am mentioning this now because I will try to post my "todo" list later today in hopes anything else that should be added can be mentioned so I can try to finish this up and provide it as a complete Alpha test connector in the next couple of days. Hopefully a Core developer can look through it and make any changes necessary and include it for the next alpha version of 2.6.

As I already mentioned, the skeleton is working great. I have to add the transaction stuff, the batch stuff and the actual execution of the SQL code. I am not really sure how the error logging system works in the core system but I am trying to duplicate it in the connector. Since prepared statements are cleansed before being performed I will be trying to use them in all cases for this class. I had to make an SQL class and include it in the database class to perform the chained methods.

At this time changes to Criteria are outside of the intended scope of this project but once I have this ready to be tested I could look into it more.

44
redheadedrod
Re: Making a PDO "plugin" for 2.5.5 to potentially include in 2.6

I have some good news and some "bad" news....

The "bad" news is my work is dead on the PDO connector..
I will finish up the current connector I was working on and release it with the new MySQLi connector. There will be no new functionality added to this connector but since it is already pretty much finished it might as well be released after I finish some work on it. The proposed code I was working on will be removed so it is just another version of the current MySQL connector.

The good news is my experience gained from working on this connector will likely be included in 2.6 for a new much better database structure. More on this when complete. Further work on the PDO and MySQLi connector for 2.5 are not likely until the work I am doing now is complete.


Login

Who's Online

322 user(s) are online (181 user(s) are browsing Support Forums)


Members: 0


Guests: 322


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits