Back to index

plone3  3.1.7
Public Member Functions
AdvancedQuery.tests.testAdvancedQuery.TestAdvancedQuery Class Reference
Inheritance diagram for AdvancedQuery.tests.testAdvancedQuery.TestAdvancedQuery:
Inheritance graph
[legend]
Collaboration diagram for AdvancedQuery.tests.testAdvancedQuery.TestAdvancedQuery:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def testSlicing
def testEq
def testLe
def testGe
def testIn
def testBetween
def testGeneric
def testIndexes
def testAnd
def testOr
def testSortSmallIndex
def testSortLargeIndex

Detailed Description

Definition at line 15 of file testAdvancedQuery.py.


Member Function Documentation

Definition at line 53 of file testAdvancedQuery.py.

00053 
00054   def testAnd(self):
00055     self._checkQuery(Eq('I1', 'a') & Eq('I2', 'A'), '1')
00056     self._checkQuery(Eq('I1', 'a') & ~ Eq('I2', 'A'), '3')
00057     q = And(Eq('I1', 'c')); q &= ~ Eq('I2', 'A'); self._checkQuery(q, '6')
00058     self._checkQuery(And(), '123456')
00059     self._checkQuery(~Eq('I1', 'a') & ~Eq('I2', 'A'), '46')
    

Here is the call graph for this function:

Definition at line 42 of file testAdvancedQuery.py.

00042 
00043   def testBetween(self):
00044     self._checkQuery(Between('I1','a','b'), '1234')
00045     self._checkQuery(Between('I1','a','b', filter=True), '1234')

Here is the call graph for this function:

Definition at line 23 of file testAdvancedQuery.py.

00023 
00024   def testEq(self):
00025     self._checkQuery(Eq('I1','a'), '13')
00026     self._checkQuery(Eq('I1','a', filter=True), '13')
00027     self._checkQuery(Eq('I1','c'), '6')
00028     self._checkQuery(Eq('I1','x'), '')

Here is the call graph for this function:

Definition at line 34 of file testAdvancedQuery.py.

00034 
00035   def testGe(self):
00036     self._checkQuery(Ge('I1','b'), '246')
00037     self._checkQuery(Ge('I1','b', filter=True), '246')

Here is the call graph for this function:

Definition at line 46 of file testAdvancedQuery.py.

00046 
00047   def testGeneric(self):
00048     self._checkQuery(Generic('I1', {'query':'a'}), '13')
00049     self._checkQuery(Generic('I1', {'query':'a'}, filter=True), '13')

Here is the call graph for this function:

Definition at line 38 of file testAdvancedQuery.py.

00038 
00039   def testIn(self):
00040     self._checkQuery(In('I1',('a','c')), '136')
00041     self._checkQuery(In('I1',('a','c'), filter=True), '136')

Here is the call graph for this function:

Definition at line 50 of file testAdvancedQuery.py.

00050 
00051   def testIndexes(self):
00052     self._checkQuery(Indexed('I1'), '12346')

Here is the call graph for this function:

Definition at line 29 of file testAdvancedQuery.py.

00029 
00030   def testLe(self):
00031     self._checkQuery(Le('I1','a'), '13')
00032     self._checkQuery(Le('I1','a', filter=True), '13')
00033     self._checkQuery(Le('I1','b'), '1234')

Here is the call graph for this function:

Definition at line 60 of file testAdvancedQuery.py.

00060 
00061   def testOr(self):
00062     self._checkQuery(Eq('I1', 'a') | Eq('I2', 'A'), '1235')
00063     self._checkQuery(Or(), '')
00064     # many or
00065     q = Or(); qb = Eq('I1', 'a')
00066     for i in range(10): q |= qb
00067     self._checkQuery(q, '13')

Here is the call graph for this function:

Definition at line 17 of file testAdvancedQuery.py.

00017 
00018   def testSlicing(self):
00019     c = self.catalog
00020     r = c.evalAdvancedQuery(Eq('I1', 'a'), ('I1',))
00021     # must not raise an exception
00022     r[1:]

Here is the call graph for this function:

Definition at line 73 of file testAdvancedQuery.py.

00073 
00074   def testSortLargeIndex(self):
00075     C = self.catalog; folder = self.folder
00076     for i in range(7,100): self._addObject(folder, i, `i`, None)
00077     q = Eq('I2', 'A')
00078     self._check(C.evalAdvancedQuery(q, ('I1',)), '125', False)
00079     self._check(C.evalAdvancedQuery(q, (('I1','desc'),)), '215', False)
00080     
00081 

Here is the call graph for this function:

Definition at line 68 of file testAdvancedQuery.py.

00068 
00069   def testSortSmallIndex(self):
00070     C = self.catalog
00071     self._check(C.evalAdvancedQuery(And(), ('I1', ('I2','desc'))), '314265', False)
00072     self._check(C.evalAdvancedQuery(Eq('I1', 'x'), ('I1', ('I2','desc'))), '', False)

Here is the call graph for this function:


The documentation for this class was generated from the following file: