added final to mingo_orm::__construct() and made mingo_orm abstract so that all child classes have to implement start(). This is a better way to this since it makes sure all the initializing that mingo_orm has to do gets done before doing stuff like setting up the schema since start() gets called in __construct right before __construct() finishes. Before, you would have to make sure you called parent::__construct() before doing something which could lead to potential problems that would make it hard for new developers to pick up and use Mingo
fixed more bugs that popped up while integrating it. Added mingo_orm::setArray() to make the get* methods always return arrays even though the instance is only representing one row, I did this so you could iterate through get* calls using foreach if you are expecting more results but only got one row in the result set. Also made setLimit() and setPage() take an array like array(,) so I only have to call one function to set both.
fixed a lot of little things that have come up since we started using Mingo in a real live environment (just goes to show you that tests will only get you so far).
added assure code to mingo_db so that when debug is on it makes sure the db implementation is returning the expected value, making it easy for developers. Also added auto-recover when a table isn't found (run setTable() when no table found error is found). Also beefed up the exception handling in mingo_db so that that the db implementations don't have to worry about catching other exceptions and turning them into mingo_exceptions, mingo_db now does that. That should greatly simplify implementation code.
added support for the orm and criteria to do getField([,...]) type magic method calls, this was previously allowed with criteria by just not including the name in the function call (eg, ->get('foo') for ->getFoo()) but couldn't be done with orm because get() and set() were already taken for something else, to keep it consistend, I made them both only support the *Field() calls. Also fixed a few bugs
fixed some problems where index table queries that didn't have a where but did have a sort (eg, you have an index on update and you just want to select the latest updated rows DESC it wouldn't the right index table, but it does now
lots of little bug fixes, and some stability fixes (like enforcing a non numeric only field name). Changed mingo_map to mingo_orm because it made more sense.
fixed some stuff I thought about last night, like querying on a table with just f1 when the defined index is f1,f2 used to fail, now it works. Also added the base to normalize user input on the public facing classes (mingo_map, mingo_schema) so that fields and stuff are always lowercase and stuff. Also made mingo more agile when in development mode (debug is on). It now checks the tables and the indexes with every db call when in development mode and updates them accordingly, so you can make a schema change and then start using it without having to run mingo_map::install() again on the object. The problem with this though is users still have to maintain an install script so that when they deploy to production the tables and indexes can be built, they might get lax though when they don't have to do stuff like that in dev.
this has full SQL support (atleast for SQLite, I have yet to test with MySQL), which includes updating, selecting, inserting, deleting. Basically, you can use this with SQLite exactly how it was used with MongoDb. There's still some rough edges (eg, you have to run install() everytime you make a schema change) but it is working pretty good with my tests.
added out::mem() and also fixed a whole bunch of bugs, and cleaned up the code a bit. Check the CHANGELOG.txt for a more complete list of what whas changed/fixed
Jaymonpushed to
master
at
Jaymon/out
Fri Dec 04 15:23:28 -0800 2009
lots of bug fixes, I also started to make the criteria class be able to also output in SQL code (broken right now) in order to use a SQL database more how friendfeed does http://bret.appspot.com/entry/how-friendfeed-uses-mysql so I don't have to be completely dependant on Mongo (and because I want to see if I can do it). Just wanted to push this out so I can get access to it in case I want to do some hacking while visiting the fam over turkey day.
Jaymonpushed to
master
at
Jaymon/out
Sat Nov 21 08:41:20 -0800 2009
fixed some bugs and made sure the class works with php <5.3, cleaned up and expanded some functions, check the changelog under 11-21-09 for more information
Jaymonpushed to
master
at
Jaymon/out
Thu Nov 19 12:16:51 -0800 2009