Skip to content

handling Date value #22

@DmitryEfimenko

Description

@DmitryEfimenko

I have a simple select statement with a condition having a column equaling to a Date instance. Please see the result. Does not seem like it's an expected behavior.

var date = new Date();
var result = jsonSql.build({
  table: 'users',
  condition: {
    insertdate: date
  }
});

// result.query: select * from "users" where "insertdate";
// result.values: []

Of course, running this results in an error.

I tried to poke around in the code, but could not quite see where to handle this. Any suggestions/help are appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions