Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql.mock is not working while using separately #38

Open
herenickname opened this issue Oct 11, 2022 · 0 comments
Open

sql.mock is not working while using separately #38

herenickname opened this issue Oct 11, 2022 · 0 comments

Comments

@herenickname
Copy link

herenickname commented Oct 11, 2022

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",
@herenickname herenickname changed the title sql.mock is not working sql.mock is not working while using separately Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant