- Fixed wrong behaviour that didn't recognise assignment properly
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@230 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
5de25127c9
commit
24b916131f
@ -123,6 +123,7 @@ def exec_line(command):
|
|||||||
exec_query( command)
|
exec_query( command)
|
||||||
|
|
||||||
def replacements(query):
|
def replacements(query):
|
||||||
|
'''This funcion replaces ascii easy operators with the correct ones'''
|
||||||
query=query.replace( '_PRODUCT' , '*')
|
query=query.replace( '_PRODUCT' , '*')
|
||||||
query=query.replace( '_UNION' , 'ᑌ')
|
query=query.replace( '_UNION' , 'ᑌ')
|
||||||
query=query.replace( '_INTERSECTION' , 'ᑎ')
|
query=query.replace( '_INTERSECTION' , 'ᑎ')
|
||||||
@ -140,8 +141,10 @@ def replacements(query):
|
|||||||
def exec_query(command):
|
def exec_query(command):
|
||||||
'''This function executes a query and prints the result on the screen'''
|
'''This function executes a query and prints the result on the screen'''
|
||||||
|
|
||||||
#Finds the name in where to save the query
|
#Performs replacements for weird operators
|
||||||
|
command=replacements(command)
|
||||||
|
|
||||||
|
#Finds the name in where to save the query
|
||||||
parts=command.split('=',1)
|
parts=command.split('=',1)
|
||||||
|
|
||||||
if len(parts)>1:
|
if len(parts)>1:
|
||||||
@ -160,9 +163,6 @@ def exec_query(command):
|
|||||||
relname='last_'
|
relname='last_'
|
||||||
query=command
|
query=command
|
||||||
|
|
||||||
#Performs replacements for weird operators
|
|
||||||
query=replacements(query)
|
|
||||||
|
|
||||||
#Execute query
|
#Execute query
|
||||||
try:
|
try:
|
||||||
pyquery=parser.parse(query)
|
pyquery=parser.parse(query)
|
||||||
@ -176,7 +176,6 @@ def exec_query(command):
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
print e
|
print e
|
||||||
|
|
||||||
|
|
||||||
def main(files=[]):
|
def main(files=[]):
|
||||||
readline.set_completer(completer.complete)
|
readline.set_completer(completer.complete)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user