- 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)
|
||||
|
||||
def replacements(query):
|
||||
'''This funcion replaces ascii easy operators with the correct ones'''
|
||||
query=query.replace( '_PRODUCT' , '*')
|
||||
query=query.replace( '_UNION' , 'ᑌ')
|
||||
query=query.replace( '_INTERSECTION' , 'ᑎ')
|
||||
@ -140,8 +141,10 @@ def replacements(query):
|
||||
def exec_query(command):
|
||||
'''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)
|
||||
|
||||
if len(parts)>1:
|
||||
@ -160,9 +163,6 @@ def exec_query(command):
|
||||
relname='last_'
|
||||
query=command
|
||||
|
||||
#Performs replacements for weird operators
|
||||
query=replacements(query)
|
||||
|
||||
#Execute query
|
||||
try:
|
||||
pyquery=parser.parse(query)
|
||||
@ -176,7 +176,6 @@ def exec_query(command):
|
||||
except Exception, e:
|
||||
print e
|
||||
|
||||
|
||||
def main(files=[]):
|
||||
readline.set_completer(completer.complete)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user