13 lines
360 B
TypeScript
13 lines
360 B
TypeScript
import * as dotenv from 'dotenv';
|
|
dotenv.config();
|
|
import pool from './src/config/database';
|
|
|
|
async function run() {
|
|
const [rows] = await pool.query<any[]>(
|
|
"SELECT username, name, role, department, position FROM user WHERE role IN ('manager','generalManager') ORDER BY role"
|
|
);
|
|
console.table(rows);
|
|
await pool.end();
|
|
}
|
|
run().catch(console.error);
|