Skip to content

toSql() omits LIMIT and SKIP if a placeholder is used #25

@arthurhsu

Description

@arthurhsu

const builder = db.select().from(tableA).limit(lf.bind(0));
console.log(lf.query.toSql(builder));

Actual
"SELECT * FROM tableA;"

Expected
"SELECT * FROM tableA LIMIT ?;"

Related code is at [1], and should be using lf.query.valueToSql_() at [2] (and check for skipBinder and limitBinder), but it is not.

I am seeing similar problems with printing the logical tree of a query, where |undefined| is shown instead of "?"

lf.tree.toString(logicalPlan.getRoot())
skip(undefined)
-project()
--table_access(tableA)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions