title: Query an existing Sqlite3 database using Knex within React
body: <p><strong>TL;DR: I can't read my sqlite database using Knex in React.</strong></p>
  
  <p>Using create-react-app I create a new single page application:</p>
  
  <p><code>npx create-react-app knex-react &amp;&amp; cd knex-react</code></p>
  
  <p>I install knex, sqlite3 (and also mssql, unsure why but I get an error otherwise):</p>
  
  <p><code>npm install knex sqlite3 mssql</code></p>
  
  <p>I change directory to public and create a new database:</p>
  
  <pre class="lang-sh prettyprint-override"><code>cd public
  sqlite3 test.db
  </code></pre>
  
  <p>I create a file called insert.sql with the following text inside it:</p>
  
  <pre class="lang-sql prettyprint-override"><code>DROP TABLE IF EXISTS people;
  
  CREATE TABLE people (
      forename text NOT NULL,  
      surname text NOT NULL,  
      PRIMARY KEY (forename, surname)
  );
  
  INSERT INTO people (forename, surname)
  VALUES ('Bob', 'White'),
  ('Brad', 'Brown'),
  ('Jill', 'Green');
  
  </code></pre>
  
  <p>at the sqlite prompt I insert this file and test correct:</p>
  
  <pre><code>sqlite&gt; .read insert.sql
  sqlite&gt; SHOW * FROM people;
  </code></pre>
  
  <p>This produces, as it should:</p>
  
  <pre><code>Bob|White
  Brad|Brown
  Jill|Green
  </code></pre>
  
  <p>I edit src/App.js to read the following:</p>
  
  <pre><code>import React from 'react';
  import './App.css';
  
  var knex = require('knex')({
    client: 'sqlite3',
    connection: {
          filename: './test.db'
    },
  });
  
  console.log(knex.select().table('people'));
  
  function App() {
    return (
      &lt;div className="App"&gt;
        &lt;header className="App-header"&gt;
          &lt;p&gt;Just a paragraph&lt;/p&gt;
        &lt;/header&gt;
      &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>
  
  <p>I run <code>npm start</code> and opening the console log the relevant line reads:</p>
  
  <blockquote>
    <p>Builder {client: Client_SQLite3, and: Builder, _single: {…}, _statements: Array(0), _method: "select", …}</p>
  </blockquote>
  
  <p>This is not what I am expecting, the <a href="https://knexjs.org/#Builder-select" rel="nofollow noreferrer">documentation</a> tells me I should get "an array of objects selected from the database" so Bob, Brad and Jill.  I'm getting nothing.</p>
  
  <p>What am I doing wrong?  Apologies for the long preamble but I wanted to provide a complete minimal example.</p>
  
  <p>I'm using Node: v12.6.0 on Ubuntu 18.04.4 LTS.</p>
  
  <p>NB - My first assumption was I've placed test.db in the wrong directory.  I've literally tried placing it everywhere with no luck...</p>