Ingo Schommer
e6e47cb35e
API DB-specific comparisators in SearchFilter and DataList
...
Too many edge cases to leave this up to datalists,
particularly now that we introduced enforced
case sensitivity/insensitivity in the ORM APIs.
2012-12-11 12:04:48 +01:00
Sean Harvey
671881420b
Remove deprecated PartialMatchFilter, use PartialMatchFilter instead
2012-11-15 14:43:12 +13:00
Simon Welsh
c49f7566c3
API Allow use of :not, :nocase and :case modifiers to SearchFilters.
...
More modifiers can be added to each class as desired.
2012-10-10 10:26:47 +13:00
Simon Welsh
79b3f8ac45
API Add exclude() method to SearchFilters that excludes items that match the filter.
2012-10-09 14:43:47 +13:00
Sam Minnee
1f7fc1f76a
FIX Remove instances of lines longer than 120c
...
The entire framework repo (with the exception of system-generated files) has been amended to respect the 120c line-length limit. This is in preparation for the enforcement of this rule with PHP_CodeSniffer.
2012-09-30 17:18:13 +13:00
Ingo Schommer
e2f073f38a
Method visibility according to coding conventions
2012-09-20 10:46:59 +02:00
Ingo Schommer
2facc31e1f
BUGFIX Case insensitive search filters for PostgreSQL ( fixes #6548 )
2012-09-02 23:02:20 +02:00
unclecheese
66dfa38d0a
ENHANCEMENT: GreaterThanFilter should be consistent with LessThanFilter
...
Numeric or float values weren't supported.
2012-08-21 12:48:01 -03:00
Sean Harvey
a9c7c69289
MINOR Ensure DataQuery used in apply() is returned on Filter classes (to be consistent with GreaterThanFilter etc which will return it)
2012-06-15 15:48:47 +12:00
unclecheese
119739de68
If a DataObject has a many_many to a SiteTree subclass, and that subclass has no database fields defined, and $this->name is "ID", this function will errantly return "SiteTreeSubClass.ID", which can never exist in a search query, since there is no such table as SiteTreeSubClass. The problem is that DataObject::hasOwnTableDatabaseField() is a little eager when passed an argument of "ID." It doesn't check to see if the object has its own table first.
2012-06-04 12:27:58 -03:00
Sam Minnee
7036abbd75
BUGFIX: Make WithinRangeFilter work with dates and related columns.
2012-05-18 16:15:13 +12:00
Simon Welsh
f07258f3cf
MINOR Update @package values to match renaming sapphire
2012-04-15 10:50:19 +12:00
Ingo Schommer
3a068a0d18
MINOR Removed references to outdated versions from docs
2012-03-09 21:34:05 +01:00
Ingo Schommer
c7a301521d
MINOR SearchFilter->setName()/setFullName()
2012-03-02 13:41:35 +01:00
Stig Lindqvist
5d7aa8f35a
BUGFIX Allow PartialMatchFilter to use an array as search term
2012-02-15 11:42:29 +01:00
Fred Condo
d370423825
Clean up trailing ?> per coding standard
...
All sapphire but the lang directory
2012-02-12 12:40:16 -08:00
Sam Minnee
fece61c90b
BUGFIX: Use numeric literal for numeric less-than filter.
2011-12-17 16:42:31 +13:00
Sam Minnee
5a157a6365
API CHANGE: Deprecate SubstringFilter in favour of PartialMatchFilter.
2011-12-17 16:42:30 +13:00
Stig Lindqvist
671c8b734d
BUGFIX NegationFilter and SubstringFilter did not set the DataModel on apply()
2011-12-17 16:42:30 +13:00
Will Rossiter
1732a17114
Merged new-orm into datagrid
2011-09-26 16:47:54 +13:00
Ingo Schommer
ce8e72cf0e
MINOR Removing executable flag from all files (thanks miiihi)
2011-09-18 22:04:02 +02:00
ajshort
81c0caaddb
API CHANGE: Renamed DataList::filter() and DataQuery::filter() to ::where().
2011-05-01 15:26:30 +12:00
Sam Minnee
c615c4eb91
ENHANCEMENT: First cut of running SearchContext through DataList/DataQuery. Note that the eventual goal is probably to ditch SearchContext entirely.
2011-05-01 15:25:58 +12:00
Sam Minnee
2948bc1c64
MINOR: Misc merges from branches/2.4
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112142 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-10-13 03:53:12 +00:00
Ingo Schommer
6460d09570
MINOR Fixed phpdoc documentation
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@103385 467b73ca-7a2a-4603-9d3b-597d59a354a9
2010-04-23 00:11:41 +00:00
Sean Harvey
bf19a704a4
BUGFIX: LessThanFilter uses SearchFilter::getDbFormattedValue, just like GreaterThanFilter (from r95388)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95637 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-12-16 05:49:33 +00:00
Ingo Schommer
40629ef55f
BUGFIX Fixed incorrect hasDatabaseField() in SearchFilter::getDbName() - use hasOwnTableDatabaseField() instead (from r93860)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93945 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-30 00:46:14 +00:00
Ingo Schommer
8ccbedc56d
BUGFIX Fixed SearchContextTest failure (from r93777)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93942 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-30 00:45:02 +00:00
Ingo Schommer
a0092fb348
MINOR Fixed reference to fieldExists() on SearchFilter which was removed from DataObject (from r93738)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93939 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-11-30 00:44:09 +00:00
Sam Minnee
9a83be9140
Merge branch 'master' of git@github.com:sminnee/sapphire
...
From: Sam Minnee <sam@silverstripe.com>
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@90071 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-10-23 23:26:10 +00:00
Geoff Munn
90f2f13267
MINOR FIX: columns quoted properly
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86529 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-17 00:19:07 +00:00
Ingo Schommer
dc459efbdb
ENHANCEMENT Added SearchContext->getFullName() to preserve the original fieldname including the relationship
...
MINOR Documentation in SearchContext and SearchFilter
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86402 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-09-15 21:18:21 +00:00
Normann Lou
95a8939c7e
ENHANCEMENT: add "InnerJoin" clause for an has_many component's ancestry classes for SearchFilter::applyRelation() so that an searchfliter could filter on that component's ancestry's field. add unit tests for this enhancement and r83500
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84113 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-10 23:34:32 +00:00
Normann Lou
efbfb4a5f2
ENHANCEMENT: add "InnerJoin" clause for an component's ancestry classes for SearchFilter::applyRelation() so that an searchfliter could filter on that component's ancestry's field.
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83500 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-08-03 04:14:22 +00:00
Ingo Schommer
86388328a1
BUGFIX Fixed SQL syntax error in MATCH AGAINST clause in FulltextFilter
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77672 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-24 21:27:48 +00:00
Sam Minnee
a74c97f564
BUGFIX: Made search filters db agnostic
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76371 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-05-07 06:00:41 +00:00
Sam Minnee
cedee5705f
BUGFIX #3798 ajshort: Let searchcontext be used on sitetree (merged r73758)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73760 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-29 21:03:17 +00:00
Ingo Schommer
b12a00c391
MINOR phpdoc documentation
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73509 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-03-22 22:59:14 +00:00
Sean Harvey
52909a915c
BUGFIX Fixed support for SearchFilter on many to many relations that don't have a component class DB table, but have a component base class table
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@71401 467b73ca-7a2a-4603-9d3b-597d59a354a9
2009-02-04 23:19:22 +00:00
Ingo Schommer
d26f08b481
MINOR merged branches/2.3 into trunk
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@67465 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-12-04 22:38:32 +00:00
Sam Minnee
a3d3fb65a9
Updated SQL queries to be ansi compatable
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66401 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-23 00:31:06 +00:00
Normann Lou
c9f081af94
APICHANGE: introduce SearchFilter::getDbFormattedValue() and GreateThanFilter will used this method to make the qurey so that it can apply to a field that input format is different that its db format, such as CalendarDateField.
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65742 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-11-12 23:39:07 +00:00
Sean Harvey
076fcde635
Deleted SmallerThanFilter - please use LessThanFilter
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64880 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-29 20:24:10 +00:00
Ingo Schommer
cc6ef50377
BUGFIX Fixed unclear SQL escaping responsibilities in SearchFilter subclasses - it now expects unescaped data, and escapes automatically when adding to the query)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63649 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-10-05 19:20:35 +00:00
Sam Minnee
ed07c0acf2
Made some methods on SearchFilter public so that SearchFilters can be co-opted for other purposes. Really, moving the magic to a DataQuery object would be better
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61067 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-19 10:09:28 +00:00
Ingo Schommer
4735f91ab8
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60352 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 03:39:14 +00:00
Ingo Schommer
bf9f349210
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60276 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-11 00:03:57 +00:00
Ingo Schommer
8d0166e298
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60265 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-10 23:29:30 +00:00
Ingo Schommer
46bbde18e7
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60261 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-10 23:03:35 +00:00
Ingo Schommer
b89328e6cc
(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)
...
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60235 467b73ca-7a2a-4603-9d3b-597d59a354a9
2008-08-09 07:03:24 +00:00