Skip to content

sql.mock is not working while using separately #38

@herenickname

Description

@herenickname

Code:

const startDateSql = sql.mock<'2022-01-01T00:00:00.0Z'>(startDate.toISOString())
const endDateSql = sql.mock<'2023-01-01T00:00:00.0Z'>(endDate.toISOString())

const query = sql`
   SELECT
       ${startDateSql}::timestamp with time zone AS "start",
       ${endDateSql}::timestamp with time zone AS "end"
   ...
`

ts-sql-plugin:

ERROR:  cannot cast type integer to timestamp with time zone
LINE 3:                     0::timestamp with time zone AS "start",

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