feat: complete Phases 2 to 5 inclusive - Access Core, Web Cockpit, Hardware enqueuing, Optical Scanner and QA (v0.5.0-beta)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from app.core.database import db_session
|
||||
|
||||
with db_session() as conn:
|
||||
c = conn.cursor(as_dict=True)
|
||||
c.execute("SELECT TOP 3 PersonaID, CREATEdByID, LastUpdateDateByID, Apellido, Nombre FROM Per")
|
||||
for r in c.fetchall():
|
||||
print(r)
|
||||
|
||||
print("--- lot table schema ---")
|
||||
c.execute("""
|
||||
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_NAME = 'lot'
|
||||
ORDER BY ORDINAL_POSITION
|
||||
""")
|
||||
for r in c.fetchall():
|
||||
print(r["COLUMN_NAME"], r["DATA_TYPE"])
|
||||
@@ -0,0 +1,16 @@
|
||||
from app.core.database import db_session
|
||||
|
||||
tables = ['PerDocCatVal', 'tck', 'tckper', 'tckprx', 'tckhst', 'pdtmdl']
|
||||
with db_session() as conn:
|
||||
c = conn.cursor(as_dict=True)
|
||||
for t in tables:
|
||||
print(f"--- {t} NOT NULL columns ---")
|
||||
c.execute(f"""
|
||||
SELECT COLUMN_NAME, DATA_TYPE, COLUMN_DEFAULT
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_NAME = '{t}' AND IS_NULLABLE = 'NO'
|
||||
""")
|
||||
print("--- Sample PerDocCatVal ---")
|
||||
c.execute("SELECT TOP 3 * FROM PerDocCatVal")
|
||||
for r in c.fetchall():
|
||||
print(r)
|
||||
Reference in New Issue
Block a user