title: SQlite result undefined issue in NodeJS
body: <p>I'm having a problem with seemingly textbook example of SQlite usage:</p>
  <p>Code below</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const db_client = new sqlite3.Database(HISTORY_DB, (err) =&gt; {
    if (err) {
      console.error(err.message, '## ERROR ##');
      return;
    }
    console.log('Connected to the SQlite DB');
  });
  
  const current_hour = new Date().getHours();
  const sql = `SELECT value FROM history where hour = ${current_hour}`;
  
  const getSql = async (sql) =&gt; {
    await db_client.get(sql, [], (err, row) =&gt; {
      if (err) {
        return console.error(err.message);
    } 
      console.log(row.value, 'FIRST');
      return parseInt(row.value);
    })
  };
  console.log(await getSql(sql), 'SECOND');</code></pre>
  </div>
  </div>
  </p>
  <p>For some reason I cannot get the value of the sql response. I've tried a couple of approaches and its always undefined, but console.log works. I cannot figure it out.</p>
  <p>Console log pasted below:</p>
  <pre><code>undefined SECOND
  Connected to the SQlite DB
  287439002531265 FIRST
  </code></pre>