Beispiel #1
0
 def statements(self):
     sql_query = strip_trailing_semicolon(self.sql_query)
     return [
         strip_trailing_semicolon(statement.strip())
         for (start_row, start_col), (
             end_row, end_col), statement in split_statements(sql_query)
     ]
Beispiel #2
0
 def _get_statements(self, hql_query):
   hql_query = strip_trailing_semicolon(hql_query)
   statements = []
   for (start_row, start_col), (end_row, end_col), statement in split_statements(hql_query):
     statements.append({
       'start': {
         'row': start_row,
         'column': start_col
       },
       'end': {
         'row': end_row,
         'column': end_col
       },
       'statement': strip_trailing_semicolon(statement.strip())
     })
   return statements
Beispiel #3
0
  def _get_statements(self, hql_query):
    hql_query = strip_trailing_semicolon(hql_query)
    hql_query_sio = StringIO.StringIO(hql_query)

    statements = []
    for (start_row, start_col), (end_row, end_col), statement in split_statements(hql_query_sio.read()):
      statements.append({
        'start': {
          'row': start_row,
          'column': start_col
        },
        'end': {
          'row': end_row,
          'column': end_col
        },
        'statement': strip_trailing_semicolon(statement.rstrip())
      })
    return statements
Beispiel #4
0
 def _get_statements(self, hql_query):
   hql_query = strip_trailing_semicolon(hql_query)
   return [strip_trailing_semicolon(statement.strip()) for statement in split_statements(hql_query)]
Beispiel #5
0
 def statements(self):
     sql_query = strip_trailing_semicolon(self.sql_query)
     return [
         strip_trailing_semicolon(statement.strip())
         for statement in split_statements(sql_query)
     ]
Beispiel #6
0
 def _get_statements(self, hql_query):
     hql_query = strip_trailing_semicolon(hql_query)
     return [
         strip_trailing_semicolon(statement.strip())
         for statement in split_statements(hql_query)
     ]
Beispiel #7
0
 def statements(self):
     sql_query = strip_trailing_semicolon(self.sql_query)
     return [
         strip_trailing_semicolon(statement.strip())
         for (start_row, start_col), (end_row, end_col), statement in split_statements(sql_query)
     ]
Beispiel #8
0
 def statements(self):
   sql_query = strip_trailing_semicolon(self.sql_query)
   return [strip_trailing_semicolon(statement.strip()) for statement in split_statements(sql_query)]