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) ]
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
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
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)]
def statements(self): sql_query = strip_trailing_semicolon(self.sql_query) return [ strip_trailing_semicolon(statement.strip()) for statement in split_statements(sql_query) ]
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) ]
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) ]
def statements(self): sql_query = strip_trailing_semicolon(self.sql_query) return [strip_trailing_semicolon(statement.strip()) for statement in split_statements(sql_query)]