- Added test

- Re-sorted CHANGELOG



git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@286 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2011-03-22 13:28:41 +07:00
parent 9c65a60b22
commit f8b0ab746b
5 changed files with 29 additions and 22 deletions

@ -1,23 +1,25 @@
1.0
- Adds history in the GUI
- Adds menus to the GUI
- Checks if given name to relations are valid
- Discards the old and not so functional tlb format
- Float type recognition is more robust, now handled using a regexp
- Date type recognition is more robust, now using a combination of regexp plus date object
- Integer type recognition now allows negative numbers in relations
- Rename operations are now much faster, content won't be copied unless subsequent updates, insert, updates or deletes will occur
- Added testsuite
- Module parallel does something, can execute queries in parallel
- Implemented select_union_intersect_subtract general optimization
- Removed encoding from .desktop file (was deprecated)
- Added manpage for relational-cli
- Internally uses set instead of lists to describe relation's content
- Tuples are internally mapped on tuples and no longer on lists
- Discards the old and not so functional tlb format
- Rename will mark the resulting relation as readonly and subsequent updates, insert, updates or deletes will actually copy the content
- Added testsuite
- Set hash method for the classes
- Parsing of strings representing dates is now cached, eliminating the need for double parse
- Fixed python expression tokenization, now uses native tokenizer
- Fixed optimization involving selection and parenthesis in the expression (Rev 260)
- Fixed futile_union_intersection_subtraction optimization that didn't work when selection operator was in the left subtree (Rev 261)
- Module parallel does something, can execute queries in parallel
- Set hash method for the classes
- Implemented select_union_intersect_subtract general optimization
- Float type recognition is more robust, now handled using a regexp
- Date type recognition is more robust, now using a combination of regexp plus date object
- Parsing of strings representing dates is now cached, eliminating the need for double parse
- Restyle of the GUI
- Adds history in the GUI
- Checks if given name to relations are valid
- Restyle of the GUI, splitters added
0.11
- Font is set only on windows (Rev 206)

@ -143,8 +143,8 @@ class node (object):
def result_format(self,rels):
'''This function returns a list containing the fields that the resulting relation will have.
Since it needs to know real instances of relations, it requires a dictionary where keys are
the names of the relations and the values are the relation objects.'''
It requires a dictionary where keys are the names of the relations and the values are
the relation objects.'''
if rels==None:
return
@ -205,15 +205,15 @@ class node (object):
return (le+ self.name +re)
def find_matching_parenthesis(expression,start=0):
def _find_matching_parenthesis(expression,start=0,openpar=u'(',closepar=u')'):
'''This function returns the position of the matching
close parenthesis to the 1st open parenthesis found
starting from start (0 by default)'''
par_count=0 #Count of parenthesis
for i in range(start,len(expression)):
if expression[i]=='(':
if expression[i]==openpar:
par_count+=1
elif expression[i]==')':
elif expression[i]==closepar:
par_count-=1
if par_count==0:
return i #Closing parenthesis of the parameter
@ -248,7 +248,7 @@ def tokenize(expression):
while len(expression)>0:
if expression.startswith('('): #Parenthesis state
state=2
end=find_matching_parenthesis(expression)
end=_find_matching_parenthesis(expression)
#Appends the tokenization of the content of the parenthesis
items.append(tokenize(expression[1:end]))
#Removes the entire parentesis and content from the expression
@ -259,7 +259,7 @@ def tokenize(expression):
expression=expression[2:].strip() #Removing operator from the expression
if expression.startswith('('): #Expression with parenthesis, so adding what's between open and close without tokenization
par=expression.find('(',find_matching_parenthesis(expression))
par=expression.find('(',_find_matching_parenthesis(expression))
else: #Expression without parenthesis, so adding what's between start and parenthesis as whole
par=expression.find('(')
@ -322,7 +322,7 @@ def parse(expr):
You can use parenthesis to change priority: a ᐅᐊ (q d).
IMPORTANT: The encoding used by this module is UTF-8
IMPORTANT: The encoding used by this module is UTF-8 (all strings must be UTF-8)
EXAMPLES
σage > 25 and rank == weight(A)

@ -36,7 +36,7 @@ class relForm(QtGui.QMainWindow):
self.undo=None #UndoQueue for queries
self.selectedRelation=None
self.ui=ui
self.qcounter=1
self.qcounter=1 #Query counter
def load_query(self,*index):
self.ui.txtQuery.setText(self.savedQ.itemData(index[0]).toString())
@ -168,7 +168,7 @@ class relForm(QtGui.QMainWindow):
It shouldn't be called giving filename but not giving name.'''
#Asking for file to load
if filename==None:
filename = QtGui.QFileDialog.getOpenFileName(self,QtGui.QApplication.translate("Form", "Load Relation"),"",QtGui.QApplication.translate("Form", "Relations (*.csv);;Old Relations (*.tlb);;Text Files (*.txt);;All Files (*)"))
filename = QtGui.QFileDialog.getOpenFileName(self,QtGui.QApplication.translate("Form", "Load Relation"),"",QtGui.QApplication.translate("Form", "Relations (*.csv);;Text Files (*.txt);;All Files (*)"))
filename=str(filename.toUtf8())
#Default relation's name

@ -0,0 +1 @@
πname,age,skill((ratings-πid,rating(σ r>rating (ρrating➡r(πrating(ratings )) * ratings)) ᐅᐊ people) ᐅᐊ skills)

@ -0,0 +1,4 @@
name,age,skill
eve,25,Perl
eve,25,C
eve,25,C++