한글뷰어 기능수정 Ver.01
This commit is contained in:
28
scratch_query_hwp.js
Normal file
28
scratch_query_hwp.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const pool = require("./db/pool.js");
|
||||
|
||||
async function run() {
|
||||
const client = await pool.connect();
|
||||
try {
|
||||
console.log("Querying HWP/HWPX files from database...");
|
||||
|
||||
const query = `
|
||||
SELECT *
|
||||
FROM ver4._test_tb_data
|
||||
WHERE ext IN ('hwp', 'hwpx')
|
||||
ORDER BY data_id DESC
|
||||
LIMIT 5;
|
||||
`;
|
||||
const res = await client.query(query);
|
||||
console.log("Results:");
|
||||
res.rows.forEach(row => {
|
||||
console.log(JSON.stringify(row, null, 2));
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("Error checking HWP files:", err);
|
||||
} finally {
|
||||
client.release();
|
||||
await pool.end();
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
Reference in New Issue
Block a user