Spaces:
Running
Running
File size: 528 Bytes
0dd2082 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | const { getDb } = require('./server/src/db/database');
async function checkRows() {
try {
const db = await getDb();
const count = await db.get('SELECT COUNT(*) as count FROM places');
console.log(`TOTAL ROWS: ${count.count}`);
const first = await db.get('SELECT * FROM places LIMIT 1');
console.log('FIRST ROW:', JSON.stringify(first, null, 2));
} catch (err) {
console.error('Debug failed:', err.message);
} finally {
process.exit(0);
}
}
checkRows();
|