- Added test
- Re-sorted CHANGELOG git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@286 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
9c65a60b22
commit
f8b0ab746b
26
CHANGELOG
26
CHANGELOG
@ -1,23 +1,25 @@
|
|||||||
1.0
|
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)
|
- Removed encoding from .desktop file (was deprecated)
|
||||||
- Added manpage for relational-cli
|
- Added manpage for relational-cli
|
||||||
- Internally uses set instead of lists to describe relation's content
|
- Internally uses set instead of lists to describe relation's content
|
||||||
- Tuples are internally mapped on tuples and no longer on lists
|
- Tuples are internally mapped on tuples and no longer on lists
|
||||||
- Discards the old and not so functional tlb format
|
- Set hash method for the classes
|
||||||
- Rename will mark the resulting relation as readonly and subsequent updates, insert, updates or deletes will actually copy the content
|
- Parsing of strings representing dates is now cached, eliminating the need for double parse
|
||||||
- Added testsuite
|
|
||||||
- Fixed python expression tokenization, now uses native tokenizer
|
- Fixed python expression tokenization, now uses native tokenizer
|
||||||
- Fixed optimization involving selection and parenthesis in the expression (Rev 260)
|
- 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)
|
- 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
|
- Restyle of the GUI, splitters added
|
||||||
- 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
|
|
||||||
|
|
||||||
0.11
|
0.11
|
||||||
- Font is set only on windows (Rev 206)
|
- Font is set only on windows (Rev 206)
|
||||||
|
@ -143,8 +143,8 @@ class node (object):
|
|||||||
|
|
||||||
def result_format(self,rels):
|
def result_format(self,rels):
|
||||||
'''This function returns a list containing the fields that the resulting relation will have.
|
'''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
|
It requires a dictionary where keys are the names of the relations and the values are
|
||||||
the names of the relations and the values are the relation objects.'''
|
the relation objects.'''
|
||||||
if rels==None:
|
if rels==None:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -205,15 +205,15 @@ class node (object):
|
|||||||
|
|
||||||
return (le+ self.name +re)
|
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
|
'''This function returns the position of the matching
|
||||||
close parenthesis to the 1st open parenthesis found
|
close parenthesis to the 1st open parenthesis found
|
||||||
starting from start (0 by default)'''
|
starting from start (0 by default)'''
|
||||||
par_count=0 #Count of parenthesis
|
par_count=0 #Count of parenthesis
|
||||||
for i in range(start,len(expression)):
|
for i in range(start,len(expression)):
|
||||||
if expression[i]=='(':
|
if expression[i]==openpar:
|
||||||
par_count+=1
|
par_count+=1
|
||||||
elif expression[i]==')':
|
elif expression[i]==closepar:
|
||||||
par_count-=1
|
par_count-=1
|
||||||
if par_count==0:
|
if par_count==0:
|
||||||
return i #Closing parenthesis of the parameter
|
return i #Closing parenthesis of the parameter
|
||||||
@ -248,7 +248,7 @@ def tokenize(expression):
|
|||||||
while len(expression)>0:
|
while len(expression)>0:
|
||||||
if expression.startswith('('): #Parenthesis state
|
if expression.startswith('('): #Parenthesis state
|
||||||
state=2
|
state=2
|
||||||
end=find_matching_parenthesis(expression)
|
end=_find_matching_parenthesis(expression)
|
||||||
#Appends the tokenization of the content of the parenthesis
|
#Appends the tokenization of the content of the parenthesis
|
||||||
items.append(tokenize(expression[1:end]))
|
items.append(tokenize(expression[1:end]))
|
||||||
#Removes the entire parentesis and content from the expression
|
#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
|
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
|
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
|
else: #Expression without parenthesis, so adding what's between start and parenthesis as whole
|
||||||
par=expression.find('(')
|
par=expression.find('(')
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ def parse(expr):
|
|||||||
|
|
||||||
You can use parenthesis to change priority: a ᐅᐊ (q ᑌ d).
|
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
|
EXAMPLES
|
||||||
σage > 25 and rank == weight(A)
|
σage > 25 and rank == weight(A)
|
||||||
|
@ -36,7 +36,7 @@ class relForm(QtGui.QMainWindow):
|
|||||||
self.undo=None #UndoQueue for queries
|
self.undo=None #UndoQueue for queries
|
||||||
self.selectedRelation=None
|
self.selectedRelation=None
|
||||||
self.ui=ui
|
self.ui=ui
|
||||||
self.qcounter=1
|
self.qcounter=1 #Query counter
|
||||||
|
|
||||||
def load_query(self,*index):
|
def load_query(self,*index):
|
||||||
self.ui.txtQuery.setText(self.savedQ.itemData(index[0]).toString())
|
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.'''
|
It shouldn't be called giving filename but not giving name.'''
|
||||||
#Asking for file to load
|
#Asking for file to load
|
||||||
if filename==None:
|
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())
|
filename=str(filename.toUtf8())
|
||||||
|
|
||||||
#Default relation's name
|
#Default relation's name
|
||||||
|
1
test/skill_of_best_person.query
Normal file
1
test/skill_of_best_person.query
Normal file
@ -0,0 +1 @@
|
|||||||
|
πname,age,skill((ratings-πid,rating(σ r>rating (ρrating➡r(πrating(ratings )) * ratings)) ᐅᐊ people) ᐅᐊ skills)
|
4
test/skill_of_best_person.result
Normal file
4
test/skill_of_best_person.result
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
name,age,skill
|
||||||
|
eve,25,Perl
|
||||||
|
eve,25,C
|
||||||
|
eve,25,C++
|
Loading…
x
Reference in New Issue
Block a user