Knowledge Base
main
main
  • Hello , There !!!
  • Blogs , Thoughts , Etc
    • Blogs
      • What happens when you type a URL into your browser?
      • HTTP Keep Alive Vs TCP keep Alive
      • How Browsers Work ?
      • Change Data Capture @ MySQL
    • Batch Vs Stream Processing
    • Book Summaries
      • 12 Rules for Life
    • Random Thoughts
      • Being On The Right Side Of The “Zero”
      • I ̶F̶̶a̶̶i̶̶l̶̶e̶̶d̶ Learnt Something New.
  • NODE JS
    • Parsing HTML DOM
    • Make HTTP Request
    • Read SQLite File
    • Remove Directory Recursively
  • JavaScript
    • Event Loop In JavaScript
  • Numbers
    • Untitled
  • Random
    • Google File System
    • Concurrency vs Parallelism
    • Spark
    • Apache Kafka[WIP]
  • Python
    • Python Memory Model
    • Multithreading With LightWeight Threads
    • Logger
  • JAVA
    • Java Memory Model
  • SQL
    • Untitled
    • Page 1
  • Machine Learning
    • Page 2
  • Productivity
    • Git
    • ssh
  • Hacks
    • Good Youtube Channels
Powered by GitBook
On this page

Was this helpful?

  1. NODE JS

Read SQLite File

const sqlite3 = require('sqlite3');

let db = new sqlite3.Database('./History', (err) => {
    if (err) {
        console.error(err.message);
    }
    console.log('Connected to the my database.');
});

db.serialize(function () {
    db.each('SELECT * FROM urls ORDER BY last_visit_time DESC', function (err, row) {
    });
});

db.close();
PreviousMake HTTP RequestNextRemove Directory Recursively

Last updated 3 years ago

Was this helpful?