Knex select always returns pending promise [duplicate]

I am writing a simple function to query my database with Knex in Node. Everything I've tried returns Promise { <pending> }

Function to query the DB:

const queryTable = async () => {
  const data = await knex
    .select("*")
    .from(TABLE_NAME)

  return data;
};

I've tried calling the function in it's own async/await wrapper, and I've tried the .then() callback after... No luck. Any leads appreciated!



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Object oriented programming concepts (OOPs)

Spring Boot and Vaadin : Filtering rows in Vaadin Grid