示例#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
文件: design.py 项目: fangxingli/hue
 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
文件: design.py 项目: 2013Commons/hue
 def statements(self):
   sql_query = strip_trailing_semicolon(self.sql_query)
   return [strip_trailing_semicolon(statement.strip()) for statement in split_statements(sql_query)]