feat: implement market page with QueryProvider and dynamic listings
- wrap root layout with QueryProvider for React Query - replace market UnderConstruction placeholder with MarketClient and real data fetching - implement search, pagination, and sort via search params using getActiveListings - add necessary client components and queries - update dependencies (e.g., prisma, pkg-types)
This commit is contained in:
1 parent
55eebde0ba
commit
ab37b477df
106 files changed
+15261
-301
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import sqlite3
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
# Caminhos
|
||||
db_path = Path('data/tibiawiki.db')
|
||||
backup_path = Path('data/tibiawiki.db.backup')
|
||||
|
||||
print('🔠Analisando estrutura do banco...')
|
||||
|
||||
# Conectar ao banco
|
||||
db = sqlite3.connect(str(db_path))
|
||||
db.row_factory = sqlite3.Row
|
||||
cursor = db.cursor()
|
||||
|
||||
# 1. Listar todas as tabelas
|
||||
cursor.execute("SELECT name FROM sqlite_master WHERE type = 'table' AND name NOT LIKE 'sqlite_%' ORDER BY name")
|
||||
tables = [row[0] for row in cursor.fetchall()]
|
||||
print(f'✅ Encontradas {len(tables)} tabelas: {', '.join(tables[:5])}...')
|
||||
|
||||
# 2. Analisar estrutura de uma tabela para entender as colunas comuns
|
||||
sample_table = tables[0]
|
||||
cursor.execute(f'PRAGMA table_info({sample_table})')
|
||||
sample_columns = [row[1] for row in cursor.fetchall()]
|
||||
print(f'📋 Colunas da tabela {sample_table}: {', '.join(sample_columns[:10])}...')
|
||||
|
||||
# 3. Verificar uma amostra de dados
|
||||
cursor.execute(f'SELECT * FROM {sample_table} LIMIT 1')
|
||||
sample = cursor.fetchone()
|
||||
if sample:
|
||||
print(f'📦 Exemplo de item: {dict(sample)}')
|
||||
|
||||
db.close()
|
||||
print('✅ Análise concluÃda!')
|
||||
Reference in new issue
Block a user