Skip to content

function date_add(unknown, unknown, unknown) does not exist #1178

Closed
@huyennbl

Description

@huyennbl

Version

1.8.0

What happened?

All versions from 1.8 to 1.10 has this bug
MySQL 8

Relevant log output

query.sql:12:2: function date_add(unknown, unknown, unknown) does not exist

Database schema

CREATE TABLE `tokens` (
  `id` bigint PRIMARY KEY AUTO_INCREMENT,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);

SQL queries

SELECT
	DATE_ADD(created_at, INTERVAL 7 HOUR)  as hello
FROM
	tokens

Configuration

version: "1"
packages:
  - name: "db"
    path: "./db/sqlc"
    queries: "./db/query/"
    schema: "./db/migration/"
    engine: "mysql"
    emit_interface: false
    emit_prepared_queries: false
    emit_exact_table_names: false
    emit_empty_slices: true

Playground URL

https://play.sqlc.dev/p/e19eb67671c484f4f69cd82f519b378cf4ce9e943343a9e59e289f340341136e

What operating system are you using?

Windows

What database engines are you using?

MySQL

What type of code are you generating?

Go

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions