Skip to content

Table declarations with no columns should not be usable in queries #305

@AnyhowStep

Description

@AnyhowStep

For example,

const myTable = sql.table("myTable");

pool.acquire(async (connection) => {
    //Place all database calls inside here
    const row = await sql.from(myTable)
        .select(columns => [columns])
        .fetchAll(connection);
    console.log(row);
});

Playground

Expected: Compile error

Actual: Compiles, run-time error


This isn't a super-critical bug, in my opinion. But it would be nice to fix this.

Most people should not run into this problem.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions