queryparser-python3 0.6.1__py3-none-any.whl → 0.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -734,15 +734,7 @@ class SQLQueryProcessor(object):
734
734
  :param replace_schema_name:
735
735
  A new schema name to be put in place of the original.
736
736
 
737
- :param indexed_objects:
738
- A dictionary defining pgsphere objects to be replaced with
739
- precomputed (on the database level) columns. For example,
740
-
741
- iob = {'spoint': ((('gdr2', 'gaia_source', 'ra'),
742
- ('gdr2', 'gaia_source', 'dec'), 'pos'),)}
743
-
744
- will replace 'spoint(RADIANS(ra), RADIANS(dec))' with a 'pos'
745
- column.
737
+ :param indexed_objects: Deprecated
746
738
 
747
739
  """
748
740
  # Antlr objects
@@ -893,14 +885,6 @@ class SQLQueryProcessor(object):
893
885
  for i in mc])
894
886
  raise QueryError("Unreferenced column(s): '%s'." % unref_cols)
895
887
 
896
- # If we have indexed_objects, we are also accessing those. We
897
- # need to add them into the columns stack:
898
- if indexed_objects is not None:
899
- for k, v in indexed_objects.items():
900
- for vals in v:
901
- touched_columns.append([[vals[0][0], vals[0][1], vals[2],
902
- None], None])
903
-
904
888
  touched_columns = set([tuple(i[0]) for i in touched_columns])
905
889
 
906
890
  # extract display_columns
@@ -942,25 +926,6 @@ class SQLQueryProcessor(object):
942
926
  if i[0][1] is not None else i[0][1]])
943
927
  for i in tables]))
944
928
 
945
- # If there are any sphere-like objects (pgsphere...) that are indexed
946
- # we need to replace the ADQL translated query parts with the indexed
947
- # column names
948
- if indexed_objects is not None and self.sphere_listener is not None:
949
- # we need to correctly alias 'pos' columns
950
- for k, v in indexed_objects.items():
951
- indexed_objects[k] = list([list(i) for i in v])
952
- for i, vals in enumerate(v):
953
- for t in tables:
954
- if vals[0][0] == t[0][0] and vals[0][1] == t[0][1] and\
955
- t[1] is not None:
956
- indexed_objects[k][i][2] = t[1] + '.' +\
957
- indexed_objects[k][i][2]
958
-
959
- sphere_listener = self.sphere_listener(columns, indexed_objects)
960
- self.walker.walk(sphere_listener, tree)
961
- for k, v in sphere_listener.replace_dict.items():
962
- self._query = self._query.replace(k, v)
963
-
964
929
  @property
965
930
  def query(self):
966
931
  """
@@ -1,4 +1,4 @@
1
- # Generated from src/queryparser/mysql/MySQLLexer.g4 by ANTLR 4.11.1
1
+ # Generated from src/queryparser/mysql/MySQLLexer.g4 by ANTLR 4.13.1
2
2
  from antlr4 import *
3
3
  from io import StringIO
4
4
  import sys
@@ -4984,7 +4984,7 @@ class MySQLLexer(Lexer):
4984
4984
 
4985
4985
  def __init__(self, input=None, output:TextIO = sys.stdout):
4986
4986
  super().__init__(input, output)
4987
- self.checkVersion("4.11.1")
4987
+ self.checkVersion("4.13.1")
4988
4988
  self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
4989
4989
  self._actions = None
4990
4990
  self._predicates = None