baucli 1.0.77__tar.gz → 1.0.78__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {baucli-1.0.77 → baucli-1.0.78}/PKG-INFO +1 -1
- {baucli-1.0.77 → baucli-1.0.78}/baucli/__init__.py +1 -1
- {baucli-1.0.77 → baucli-1.0.78}/baucli/db/mssql.py +8 -2
- {baucli-1.0.77 → baucli-1.0.78}/baucli/db/mysql.py +7 -2
- {baucli-1.0.77 → baucli-1.0.78}/baucli/db/oracle.py +7 -2
- {baucli-1.0.77 → baucli-1.0.78}/baucli/db/postgresql.py +7 -2
- {baucli-1.0.77 → baucli-1.0.78}/baucli.egg-info/PKG-INFO +1 -1
- {baucli-1.0.77 → baucli-1.0.78}/setup.py +1 -1
- {baucli-1.0.77 → baucli-1.0.78}/MANIFEST.in +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/README.md +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/apex_rebuild.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/apexlang.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/api.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/canon.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/cli.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/config.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/db/__init__.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm_sql/mssql/crm_data_mssql.sql +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm_sql/mssql/crm_demo_mssql.sql +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm_sql/mysql/crm_data_mysql.sql +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm_sql/mysql/crm_demo_mysql.sql +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm_sql/oracle/crm_demo_oracle.sql +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm_sql/postgresql/crm_data_postgresql.sql +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/democrm_sql/postgresql/crm_demo_postgresql.sql +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/diffenvs.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/docmig.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/git.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/legacy/__init__.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/legacy/delphi.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/legacy/magic.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/mcp_server.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/project.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/rag_embed.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/sample_scan.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/scope_scan.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/screenshot.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/seed_check.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/skills.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/stress.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli/sync.py +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli.egg-info/SOURCES.txt +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli.egg-info/dependency_links.txt +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli.egg-info/entry_points.txt +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli.egg-info/requires.txt +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/baucli.egg-info/top_level.txt +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/setup.cfg +0 -0
- {baucli-1.0.77 → baucli-1.0.78}/tests/test_canon_multiengine.py +0 -0
|
@@ -259,7 +259,9 @@ class MSSQLExtractor(BaseExtractor):
|
|
|
259
259
|
) THEN 'INDEXED VIEW'
|
|
260
260
|
WHEN o.type = 'V' THEN 'VIEW'
|
|
261
261
|
END AS table_type,
|
|
262
|
-
CAST(OBJECT_DEFINITION(o.object_id) AS NVARCHAR(MAX)) AS view_source
|
|
262
|
+
CAST(OBJECT_DEFINITION(o.object_id) AS NVARCHAR(MAX)) AS view_source,
|
|
263
|
+
(SELECT SUM(p.rows) FROM sys.partitions p
|
|
264
|
+
WHERE p.object_id = o.object_id AND p.index_id IN (0, 1)) AS num_rows
|
|
263
265
|
FROM sys.objects o
|
|
264
266
|
JOIN sys.schemas s ON s.schema_id = o.schema_id
|
|
265
267
|
WHERE s.name = %s
|
|
@@ -479,7 +481,7 @@ class MSSQLExtractor(BaseExtractor):
|
|
|
479
481
|
on_progress(0, total_tbl, f"all metadata loaded, building {total_tbl} entries...")
|
|
480
482
|
|
|
481
483
|
# ═══ Build results per table ═══
|
|
482
|
-
for idx, (table_name, last_ddl, table_type, view_src) in enumerate(tables):
|
|
484
|
+
for idx, (table_name, last_ddl, table_type, view_src, num_rows) in enumerate(tables):
|
|
483
485
|
if on_progress:
|
|
484
486
|
on_progress(idx + 1, total_tbl, table_name)
|
|
485
487
|
|
|
@@ -507,6 +509,10 @@ class MSSQLExtractor(BaseExtractor):
|
|
|
507
509
|
}
|
|
508
510
|
if table_comment:
|
|
509
511
|
entry["comment"] = table_comment
|
|
512
|
+
if num_rows is not None:
|
|
513
|
+
# sys.partitions (heap/clustered) = contagem de catalogo (NULL em
|
|
514
|
+
# views) — alimenta NUM_ROWS (estilo da LOV SELECT/COMBO/POPUP)
|
|
515
|
+
entry["num_rows"] = int(num_rows)
|
|
510
516
|
if constraints:
|
|
511
517
|
entry["constraints"] = constraints
|
|
512
518
|
if view_src:
|
|
@@ -242,7 +242,8 @@ class MySQLExtractor(BaseExtractor):
|
|
|
242
242
|
SELECT t.TABLE_NAME,
|
|
243
243
|
REPLACE(CAST(COALESCE(t.UPDATE_TIME, t.CREATE_TIME) AS CHAR), ' ', 'T') AS LAST_DDL,
|
|
244
244
|
t.TABLE_COMMENT,
|
|
245
|
-
t.TABLE_TYPE
|
|
245
|
+
t.TABLE_TYPE,
|
|
246
|
+
t.TABLE_ROWS
|
|
246
247
|
FROM INFORMATION_SCHEMA.TABLES t
|
|
247
248
|
WHERE t.TABLE_SCHEMA = %s
|
|
248
249
|
AND t.TABLE_TYPE IN ('BASE TABLE', 'VIEW')
|
|
@@ -405,7 +406,7 @@ class MySQLExtractor(BaseExtractor):
|
|
|
405
406
|
on_progress(0, total_tbl, "building entries...")
|
|
406
407
|
|
|
407
408
|
# ═══ Build results per table ═══
|
|
408
|
-
for idx, (table_name, last_ddl, table_comment, mysql_type) in enumerate(tables):
|
|
409
|
+
for idx, (table_name, last_ddl, table_comment, mysql_type, num_rows) in enumerate(tables):
|
|
409
410
|
if on_progress:
|
|
410
411
|
on_progress(idx + 1, total_tbl, table_name)
|
|
411
412
|
bau_type = 'VIEW' if mysql_type == 'VIEW' else 'TABLE'
|
|
@@ -444,6 +445,10 @@ class MySQLExtractor(BaseExtractor):
|
|
|
444
445
|
}
|
|
445
446
|
if table_comment:
|
|
446
447
|
entry["comment"] = table_comment
|
|
448
|
+
if num_rows is not None:
|
|
449
|
+
# TABLE_ROWS = estimativa do otimizador (NULL em views) — alimenta
|
|
450
|
+
# BAU_DOCTAB_TABLES.NUM_ROWS (estilo da LOV SELECT/COMBO/POPUP)
|
|
451
|
+
entry["num_rows"] = int(num_rows)
|
|
447
452
|
if constraints:
|
|
448
453
|
entry["constraints"] = constraints
|
|
449
454
|
if view_source:
|
|
@@ -913,7 +913,8 @@ class OracleExtractor(BaseExtractor):
|
|
|
913
913
|
tc.COMMENTS AS TABLE_COMMENT,
|
|
914
914
|
CASE WHEN EXISTS (SELECT 1 FROM {prefix}_MVIEWS m
|
|
915
915
|
WHERE m.OWNER = o.OWNER AND m.MVIEW_NAME = o.OBJECT_NAME)
|
|
916
|
-
THEN 'MATERIALIZED VIEW' ELSE o.OBJECT_TYPE END AS OBJECT_TYPE
|
|
916
|
+
THEN 'MATERIALIZED VIEW' ELSE o.OBJECT_TYPE END AS OBJECT_TYPE,
|
|
917
|
+
t.NUM_ROWS AS NUM_ROWS
|
|
917
918
|
FROM {prefix}_OBJECTS o
|
|
918
919
|
LEFT JOIN {prefix}_TABLES t ON t.OWNER = o.OWNER AND t.TABLE_NAME = o.OBJECT_NAME AND o.OBJECT_TYPE = 'TABLE'
|
|
919
920
|
LEFT JOIN {prefix}_VIEWS v ON v.OWNER = o.OWNER AND v.VIEW_NAME = o.OBJECT_NAME AND o.OBJECT_TYPE = 'VIEW'
|
|
@@ -1169,7 +1170,7 @@ class OracleExtractor(BaseExtractor):
|
|
|
1169
1170
|
on_progress(0, total_tbl, "building entries...")
|
|
1170
1171
|
|
|
1171
1172
|
# ═══ Build results per table ═══
|
|
1172
|
-
for idx, (table_name_raw, last_ddl, table_comment, obj_type) in enumerate(tables):
|
|
1173
|
+
for idx, (table_name_raw, last_ddl, table_comment, obj_type, num_rows) in enumerate(tables):
|
|
1173
1174
|
table_name = table_name_raw or ''
|
|
1174
1175
|
if not table_name:
|
|
1175
1176
|
continue
|
|
@@ -1233,6 +1234,10 @@ class OracleExtractor(BaseExtractor):
|
|
|
1233
1234
|
}
|
|
1234
1235
|
if table_comment:
|
|
1235
1236
|
entry["comment"] = table_comment
|
|
1237
|
+
if num_rows is not None:
|
|
1238
|
+
# NUM_ROWS das estatisticas do otimizador (dba_tables) — alimenta
|
|
1239
|
+
# BAU_DOCTAB_TABLES.NUM_ROWS (estilo da LOV: SELECT/COMBO/POPUP)
|
|
1240
|
+
entry["num_rows"] = int(num_rows)
|
|
1236
1241
|
if constraints:
|
|
1237
1242
|
entry["constraints"] = constraints
|
|
1238
1243
|
if indexes:
|
|
@@ -286,7 +286,8 @@ class PostgreSQLExtractor(BaseExtractor):
|
|
|
286
286
|
COALESCE(s.last_autovacuum, '1970-01-01'::timestamp)
|
|
287
287
|
), 'YYYY-MM-DD"T"HH24:MI:SS'),
|
|
288
288
|
TO_CHAR(CURRENT_TIMESTAMP, 'YYYY-MM-DD"T"HH24:MI:SS')
|
|
289
|
-
) AS last_ddl
|
|
289
|
+
) AS last_ddl,
|
|
290
|
+
c.reltuples AS num_rows
|
|
290
291
|
FROM pg_class c
|
|
291
292
|
JOIN pg_namespace n ON n.oid = c.relnamespace
|
|
292
293
|
LEFT JOIN pg_description d ON d.objoid = c.oid AND d.objsubid = 0
|
|
@@ -502,7 +503,7 @@ class PostgreSQLExtractor(BaseExtractor):
|
|
|
502
503
|
on_progress(0, total_tbl, "building entries...")
|
|
503
504
|
|
|
504
505
|
# ═══ Build results per table ═══
|
|
505
|
-
for idx, (table_name, table_comment, table_type, last_ddl) in enumerate(tables):
|
|
506
|
+
for idx, (table_name, table_comment, table_type, last_ddl, num_rows) in enumerate(tables):
|
|
506
507
|
if on_progress:
|
|
507
508
|
on_progress(idx + 1, total_tbl, table_name)
|
|
508
509
|
|
|
@@ -548,6 +549,10 @@ class PostgreSQLExtractor(BaseExtractor):
|
|
|
548
549
|
}
|
|
549
550
|
if table_comment:
|
|
550
551
|
entry["comment"] = table_comment
|
|
552
|
+
# reltuples: estimativa do ANALYZE. -1 = nunca analisada (PG14+);
|
|
553
|
+
# view comum reporta 0 sem significado -> so tabela/matview.
|
|
554
|
+
if num_rows is not None and num_rows >= 0 and table_type != 'VIEW':
|
|
555
|
+
entry["num_rows"] = int(num_rows)
|
|
551
556
|
if constraints:
|
|
552
557
|
entry["constraints"] = constraints
|
|
553
558
|
if view_source:
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="baucli",
|
|
5
|
-
version="1.0.
|
|
5
|
+
version="1.0.78",
|
|
6
6
|
description="Extracts verified business-logic and schema context from Oracle, PostgreSQL, MySQL and SQL Server",
|
|
7
7
|
long_description=open("README.md").read(),
|
|
8
8
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|