Пример #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)
     ]
Пример #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
Пример #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
Пример #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)]
Пример #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)
     ]
Пример #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)
     ]
Пример #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)
     ]
Пример #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)]