[wp-trac] [WordPress Trac] #12891: Advanced multi-taxonomy WP_Query()s
WordPress Trac
wp-trac at lists.automattic.com
Mon Sep 6 23:15:51 UTC 2010
#12891: Advanced multi-taxonomy WP_Query()s
----------------------------+-----------------------------------------------
Reporter: markjaquith | Owner: markjaquith
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 3.1
Component: Query | Version: 3.0.1
Severity: normal | Keywords: taxonomies has-patch
----------------------------+-----------------------------------------------
Comment(by mikeschinkel):
Replying to [comment:21 scribu]:
> I believe having a working solution in 3.1 is better than maybe having
an ideal solution in a future release.
> I mean, this ticket has been open for 5 months, with an even older one
open for 16 months. It's time we ship something.
Fair point, and agreed.
But realize it will just push the limits to different point; i.e there
will still be people needing more.
Something to consider for v3.2 or later; '''a specialized SQL-like WP-
specific query language''' that can handle anything SQL can handle, have
it's own QOM (Query Object Mode) like HTML5 has it's own DOM, and be much
simpler given it recognizes the underlying patterns in WordPress and would
ultimately map to MySQL (or maybe SQLite or even a NoSQL variant.)
Envision queries like:
{{{
LIST posts WITH TAG featured
LIST posts WITH TAXONOMY color TERMS red,green,blue
LIST posts WITH TYPE event SORTED BY title
LIST posts DURING 2010 REVERSE SORTED BY date
LIST posts CONTAINING "WordPress Plugins"
GET post IDENTIFIED BY 37
GET post ID 37
GET page IDENTIFIED BY about
GET page SLUG about
LIST postfields WHERE post IDENTIFIED BY 37
LIST postfields WHERE posts WITH TAG featured
LIST posts WITH TAGS GROUP(featured AND issues) BUT NOT politics
}}}
The design is to be approachable by mere mortals and to avoid much of what
make SQL appear to be arcane to most people.
I've already written much of the EBNF for it. '''And yes, it would start
life as a plugin.'''
-Mike
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12891#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list