mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-26 19:04:32 +02:00
Swap count and value in analyze output
This commit is contained in:
parent
f65fe8ad5c
commit
1491467444
4 changed files with 20 additions and 20 deletions
|
|
@ -1394,7 +1394,7 @@ def analyze_tables(
|
|||
# Now we now how many we need to do
|
||||
for i, (table, column) in enumerate(todo):
|
||||
column_details = db[table].analyze_column(
|
||||
column, total_rows=table_counts[table]
|
||||
column, total_rows=table_counts[table], value_truncate=80
|
||||
)
|
||||
if save:
|
||||
db["_analyze_tables_"].insert(
|
||||
|
|
@ -1438,7 +1438,7 @@ def _render_common(title, values):
|
|||
return ""
|
||||
lines = [title]
|
||||
for value, count in values:
|
||||
lines.append(" {}: {}".format(value, count))
|
||||
lines.append(" {}: {}".format(count, value))
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1944,7 +1944,7 @@ class Table(Queryable):
|
|||
return self
|
||||
|
||||
def analyze_column(
|
||||
self, column, common_limit=10, value_truncate=80, total_rows=None
|
||||
self, column, common_limit=10, value_truncate=None, total_rows=None
|
||||
):
|
||||
db = self.db
|
||||
table = self.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue