User Story 1. Search by query
1/ John has an XWiki installation. He wants to show the list of users of his wiki
//$xwiki.search.searchByClass("XWiki.XWikiUsers", String ordercolumn, String orderdirection, int count, int start)
$xwiki.query.searchByClass("XWiki.XWikiUsers", "creationDate", "desc", 10, 0);
$xwiki.query.sqlsearch("from XWiki.XWikiUsers order by creationDate desc")
"for $u in /XWiki/XWikiUsers"+
"return [$u/first_name $u/last_name>$u/name]\n"
2/ He wants to show the list of users which lastname_name is begining by 'A'
$xwiki.query.sqlsearch("from XWiki.XWikiUsers where lastname_name like 'A%'")
"for $u in /XWiki/XWikiUsers where $u/last_name like 'A%'"
To be continued..
//more Java-API, Insert & Delete query
sqlsearch language is similar to hql. But it use special classes and flex-attributes (fields of special class editable by web). It will be translate to real hql with additionals joins.
xqysearch need to be full translate to hql for hibernate.
name for xwiki.query
maybe need a simplify syntax?
Comments are welcomed.