| 316 | return result |
| 317 | |
| 318 | def get_rows(self, tablename:str, limit:int=10)->Result: |
| 319 | result = Result(table_name=tablename) |
| 320 | sentence = f"Select * from {tablename} LIMIT {limit}" |
| 321 | rows = self._select(sentence, showColumns=True) |
| 322 | for col in list(rows[0].keys()): |
| 323 | if col != Settings.checksum_column: |
| 324 | result.headers.append(col) |
| 325 | |
| 326 | for item in rows: |
| 327 | items = [] |
| 328 | for key in item: |
| 329 | if key != Settings.checksum_column: |
| 330 | items.append(item[key]) |
| 331 | |
| 332 | result.rows.append(items) |
| 333 | |
| 334 | return result |
| 335 | |