- Added doc on function signature

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@253 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2010-10-04 09:33:51 +07:00
parent e375a65ec6
commit 973f11f1e0
1 changed files with 17 additions and 3 deletions

@ -38,7 +38,12 @@ tree=parser.tree
#End of the stuff #End of the stuff
def optimize_all(expression,rels): def optimize_all(expression,rels):
'''This function performs all the available optimizations''' '''This function performs all the available optimizations
Expression is the UTF-8 encoded string containing the expression to optimize
rels is a dictionary like {'name':relation}
Return value: this will return an optimized version of the expression'''
n=tree(expression) #Gets the tree n=tree(expression) #Gets the tree
total=1 total=1
while total!=0: while total!=0:
@ -52,7 +57,12 @@ def optimize_all(expression,rels):
def specific_optimize(expression,rels): def specific_optimize(expression,rels):
'''This function performs specific optimizations. Means that it will need to '''This function performs specific optimizations. Means that it will need to
know the fields used by the relations''' know the fields used by the relations
Expression is the UTF-8 encoded string containing the expression to optimize
rels is a dictionary like {'name':relation}
Return value: this will return an optimized version of the expression'''
n=tree(expression) #Gets the tree n=tree(expression) #Gets the tree
total=1 total=1
while total!=0: while total!=0:
@ -63,7 +73,11 @@ def specific_optimize(expression,rels):
def general_optimize(expression): def general_optimize(expression):
'''This function performs general optimizations. Means that it will not need to '''This function performs general optimizations. Means that it will not need to
know the fields used by the relations''' know the fields used by the relations
Expression is the UTF-8 encoded string containing the expression to optimize
Return value: this will return an optimized version of the expression'''
n=tree(expression) #Gets the tree n=tree(expression) #Gets the tree
total=1 total=1
while total!=0: while total!=0: