|
Tv2 documentation | |||||
PREV NEXT | FRAMES NO FRAME | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Query parser and processor.
Field Summary | |
private array | $b Query branch array |
private array | $fat Reference to tv2Xdb::fat array |
private array | $icontext Experimental. |
private array | $ictime document ids indexed by document ctime |
private array | $iid Array of all tv2Xdb document ids |
private array | $ilanguage Experimental. |
private array | $iname document ids indexed by document name |
private array | $ipath document ids indexed by document path |
private array | $istatus Experimental. |
private array | $itype document ids indexed by document type |
private array | $ivtime Experimental. |
private array | $liid Reference to tv2XQuery:$iid array |
private array | $qr Query result |
private object | $xi ctlIndexer object |
Constructor Summary | |
void | tv2XQuery() Constructor |
Method Summary | |
private integer | addBNode(integer $t, integer $p, [array $c]) Inserts branch into branch array |
private integer | addBQF(string& $query, integer $p) Adds full query branch |
private integer | addBQI(string& $q, integer $p) Add indexed query branch |
private integer | addBQS(string& $q, integer $p) Adds system query branch |
private string | bgn(string $s, integer $l) return up to $l symbols from the begining of the string lowercased |
private boolean | error(string $msg) Error reporting |
private void | fillResult(array $r) Fills result array |
private void | iQuery(integer $i) Executes indexed query branch |
boolean | load(array& $fat) Fills system indexes with data, creates reference to all ids array |
private boolean | loadXIndex() Loads ctlIndexer object into parameter $xi |
private string | matchOP(string& $q) Takes operation from the query and returns it in internal format |
private mixed | matchVAL(string& $q) Takes value from the query string |
private boolean | parseQuery(string $q) Main query parsing loop |
private void | propagateDown(integer $c, array $s) updates scope on child branch |
private void | propagateUp(integer $p, array $r, mixed $c) Sends partial result to parent branch |
array | query(string $q, [array $o], [integer $s], [integer $l]) Queries Xdb using SQL-like synthax |
private void | removeNull() Removes NULL branches from branch array |
private array | sortB() Sorts branch array according to branch weights |
private void | sQuery(integer $i) Executes system query branch |
private void | xQuery(integer $i) Executes unknown branch |
Field Detail |
private array $b
Query branch array
private array $fat
Reference to tv2Xdb::fat array
private array $icontext
Experimental. document ids indexed by document version context
private array $ictime
document ids indexed by document ctime
private array $iid
Array of all tv2Xdb document ids
private array $ilanguage
Experimental. document ids indexed by document version language
private array $iname
document ids indexed by document name
private array $ipath
document ids indexed by document path
private array $istatus
Experimental. document ids indexed by document version status
private array $itype
document ids indexed by document type
private array $ivtime
Experimental. document ids indexed by document version time
private array $liid
Reference to tv2XQuery:$iid array
private array $qr
Query result
private object $xi
ctlIndexer object
Constructor Detail |
void tv2XQuery()
Constructor
Method Detail |
private integer addBNode(integer $t, integer $p, [array $c])
Inserts branch into branch array
t
- branch typep
- parent branch idc
- children arrayprivate integer addBQF(string& $query, integer $p)
Adds full query branch
query
- being parsedp
- parent node idprivate integer addBQI(string& $q, integer $p)
Add indexed query branch
q
- query being parsedp
- parent branch idprivate integer addBQS(string& $q, integer $p)
Adds system query branch
q
- query being parsedp
- parent branch idprivate string bgn(string $s, integer $l)
return up to $l symbols from the begining of the string lowercased
s
- input stringl
- portion lengthprivate boolean error(string $msg)
Error reporting
msg
- - error messageprivate void fillResult(array $r)
Fills result array
r
- result arrayprivate void iQuery(integer $i)
Executes indexed query branch
i
- branch idboolean load(array& $fat)
Fills system indexes with data, creates reference to all ids array
fat
- array from tv2Xdb::fatprivate boolean loadXIndex()
Loads ctlIndexer object into parameter $xi
private string matchOP(string& $q)
Takes operation from the query and returns it in internal format
q
- query stringprivate mixed matchVAL(string& $q)
Takes value from the query string
q
- query stringprivate boolean parseQuery(string $q)
Main query parsing loop
q
- query stringprivate void propagateDown(integer $c, array $s)
updates scope on child branch
c
- child branch ids
- scope arrayprivate void propagateUp(integer $p, array $r, mixed $c)
Sends partial result to parent branch
p
- parent branch idr
- partial resultc
- child branch idarray query(string $q, [array $o], [integer $s], [integer $l])
Queries Xdb using SQL-like synthax
q
- SQL like queryo
- order by: array('field', 'ASC'/'DESC')s
- start from (default 0)l
- limit result number toprivate void removeNull()
Removes NULL branches from branch array
private array sortB()
Sorts branch array according to branch weights
private void sQuery(integer $i)
Executes system query branch
i
- branch idprivate void xQuery(integer $i)
Executes unknown branch
i
- branch id
|
Tv2 documentation | |||||
PREV NEXT | FRAMES NO FRAME | |||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This document was generated by phpdocgen 0.17-rc3.
Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)