Commit Graph

1040 Commits

Author SHA1 Message Date
Will Rossiter
cb064203ba MINOR: defined the addslashes() method on the abstract SS_Database as Convert::raw2sql() assumes it exists. FIXES: #6662 2011-06-10 16:36:13 +12:00
Sam Minnee
878b348a0f Merge branch 'master' into new-orm
Conflicts:
	docs/en/reference/built-in-page-controls.md
	model/SQLQuery.php
2011-05-26 17:08:10 +12:00
Ingo Schommer
ced7d6db7a MINOR Return empty string from SQLQuery->sql() if SELECT is the default value, and no FROM is set (moved logic from DB-specific implementations) 2011-05-19 14:34:01 +12:00
Ingo Schommer
cfe0066a3b BUGFIX Allow omitting FROM clause in sqlQueryToString() 2011-05-19 11:37:33 +12:00
Ingo Schommer
cbf191b14c MINOR Temporarily disabled deprecation notice in DataObjectDecorator and LeftAndMainDecorator, to be re-enabled once we're in beta stage (they unnecessarily break too many modules for now 2011-05-19 10:25:15 +12:00
ajshort
1f6f7f0862 API CHANGE: Deprecated CompositeField->FieldSet() in favour of CompositeField->FieldList().
MINOR: Replaced usage of FieldSet with FieldList.
MINOR: Renamed FieldSetTest to FieldListTest.
2011-05-11 17:51:54 +10:00
ajshort
a75abd5cd7 MINOR: Replaced DataObjectSet with ArrayList in MySQLDatabase->searchEngine(). 2011-05-06 07:08:33 +10:00
ajshort
2294ef5820 API CHANGE: Deprecated DataObjectSet in favour of DataList or ArrayList.
MINOR: Moved DataObjectSet tests to ArrayListTest.
2011-05-06 00:52:50 +10:00
ajshort
c954ae5aaa MINOR: Renamed ArrayList->array to ArrayList->items; 2011-05-06 00:30:45 +10:00
ajshort
b3fc458101 ENHANCEMENT: Made it possible to sort by multiple fields in ArrayList::sort(). 2011-05-06 00:24:33 +10:00
ajshort
462689a4e6 ENHANCEMENT: Added ArrayList->removeDuplicates(). 2011-05-05 20:53:07 +10:00
ajshort
99a2baf3f8 MINOR: Updated ArrayList->getRange() to return an ArrayList instance. 2011-05-05 20:41:06 +10:00
ajshort
2a3fdd16a4 MINOR: Added a default "ID" parameter to ArrayList->column(). 2011-05-05 20:40:51 +10:00
ajshort
3f132a105b API CHANGE: Replaced DataObjectSet instances with ArrayList. 2011-05-05 20:40:24 +10:00
ajshort
9f87294427 ENHANCEMENT: Added exists(), replace(), merge(), push(), pop(), unshift() and shift() methods to ArrayList. 2011-05-05 17:48:12 +10:00
ajshort
7e7677bbba FEATURE: Added ArrayList to allow an array of arrays or objects to be handled as a list. 2011-05-04 00:06:42 +10:00
ajshort
26faead3e5 MINOR: Made DataObjectSet implement the SS_List interface. 2011-05-03 12:16:15 +10:00
ajshort
b872ad7bb8 MINOR: Added default parameters to DataList->map(). 2011-05-03 12:15:49 +10:00
ajshort
50506659d1 API ChANGE: Updated DataList to not extend from DataObjectSet, but instead implement the list iterator.
MINOR: Return an ArrayIterator from DataList rather than a DataObjectSet_Iterator.
2011-05-02 18:14:55 +10:00
ajshort
df87fd5a11 API CHANGE: Updated SS_ListDecorator to implement the list inteface and extend ViewableData, rather than DataObjectSet. 2011-05-02 18:12:39 +10:00
ajshort
a940fb2888 FEATURE: Added the SS_List interface which classes can implement to be recognised as a list. 2011-05-02 13:38:40 +10:00
Sam Minnee
7fbb919ce8 API CHANGE: Introduce DataModel object, as a representation of the project's entire data model, and tie it to $this->model an all DataObjects, Controllers, and RequestHandlers for easy non-static access.
API CHANGE: Add DataList::newObject(), which creates a new object on that DataList.
API CHANGE: RequestHandler::handleRequest() now needs to handle a $model argument, if you override it.
2011-05-01 17:33:02 +12:00
Sam Minnee
a15b6941a6 BUGFIX: Replaced ManifestBuilder::has_been_included() with SS_ClassLoader::hasManifest(). 2011-05-01 17:12:26 +12:00
ajshort
34e9ddfcc3 MINOR: Moved files from /core/model into /model. 2011-05-01 15:26:30 +12:00
ajshort
81c0caaddb API CHANGE: Renamed DataList::filter() and DataQuery::filter() to ::where(). 2011-05-01 15:26:30 +12:00
ajshort
8fb7b531cf MINOR: Updated MySQLDatabase::searchEngine() to use the new PaginatedList API. 2011-05-01 15:26:30 +12:00
ajshort
3fbb29a6c5 FEATURE: Added PaginatedList, which wraps around a data list or set to provide pagination functionality. This replaces the pagination functionality baked into DataObjectSet.
API CHANGE: Removed pagination related methods from DataObjectSet and implemented them on PaginatedList.
API CHANGE: Removed DataObjectSet::parseQueryLimit(), this is now implemented as PaginatedList::setPaginationFromQuery().
API CHANGE: Deprecated DataObjectSet::TotalItems in favour of Count().
ENHANCEMENT: Added FirstLink and LastLink to PaginatedList.
MINOR: Updated documentation, and added a how-to on paginating items.
2011-05-01 15:26:29 +12:00
Sam Minnee
6915e58a39 BUGFIX: Fix SQLQuery::queriedTables() and added test. 2011-05-01 15:26:29 +12:00
Sam Minnee
f83abe416c MINOR: Improved some exception handling. 2011-05-01 15:25:58 +12:00
Sam Minnee
0ba86971e2 API CHANGE: Removed context object - it's a hack. 2011-05-01 15:25:58 +12:00
Sam Minnee
c57378753d ENHANCEMENT: Improved Versioned to pass different query styles as DataQuery modes. 2011-05-01 15:25:46 +12:00
Sam Minnee
165f38361b BUGFIX: Updated Hierarchy::liveChildren() to use DataList over buildDataObjectSet. 2011-05-01 15:25:45 +12:00
Sam Minnee
050e0675ce ENHANCEMENT: Created HasManyList and ManyManyList objects that represent relations. API CHANGE: Relation methods no longer cache their results. API CHANGE: ComponentSet is deprecated. API CHANGE: DataObject::getManyManyComponentsQuery() no longer exists; just use the ManyManyList itself. API CHANGE: DataObject::getManyManyJoin() no longer exists; just use the ManyManyList itself. API CHANGE: DataObject::getManyManyFilter() no longer exists; just use the ManyManyList itself. 2011-05-01 15:25:45 +12:00
Sam Minnee
de1494e3a8 ENHANCEMENT: Implemented DataList as the successor of DataObjectSet. DataList doesn't execute the query until it's actually needed, allowing for a more flexible ORM.
API CHANGE: augmentSQL is now passed a DataQuery object from which query parameters can be extracted.
API CHANGE: DataObjectDecorators that manipulate the query can now define augmentDataQueryCreation().
API CHANGE: The container class argument for DataObject::get() is deprecated.
API CHANGE: DataObject::buildSQL() and DataObject::extendedSQL() are deprecated; just use DataObject::get() now.
API CHANGE: DataObject::instance_get() and DataObject::instance_get_one() are deprecated, and can no longer be overloaded.
API CHANGE: DataObject::buildDataObjectSet() is deprecated.
API CHANGE: Cant't call manual manipulation methods on DataList such as insertFirst()
2011-05-01 15:25:45 +12:00
Sam Minnee
7fab93f7cb API CHANGE: Added SQLQuery::count(), SQLQuery::firstRow(), and SQLQuery::lastRow() 2011-05-01 15:25:14 +12:00
Sam Minnee
8a9903988f MINOR: Always store SQLQuery::$limit as a 2-element array internally. 2011-05-01 15:25:14 +12:00
Sam Minnee
199e267bbf MINOR: Don't add 'OFFSET 0' to a query unnecessarily. 2011-05-01 15:25:14 +12:00
ajshort
3a1c2df4e7 API CHANGE: Renamed DataObjectDecorator to DataExtension.
API CHANGE: Renamed LeftAndMainDecorator to LeftAndMainExtension.
MINOR: Replaced all references to decorators with extension.
2011-04-26 11:01:38 +10:00
ajshort
e8dd38eac3 API CHANGE: Removed DataObjectLog class, the same functionality should be implemented using extensions. 2011-04-26 11:01:38 +10:00
Ingo Schommer
9b29616710 API CHANGE Rearranged files in sapphire to reflect core dependencies more accurately, and have the tests/ folder mirror its folder structure 2011-03-31 09:56:21 +13:00