Value type is standard time.Time and query string after .ToSql(), the question mark is persist instead generated into complete query string with values intended. Am I missing something?
SELECT * FROM sensor_measurements WHERE measured_at >= '2024-02-01 01:00:00' AND measured_at <= '2024-02-01 02:00:00'
Originally, the complete query intended as follows:
SELECT * FROM sensor_measurements WHERE measured_at BETWEEN '2024-02-01 01:00:00' AND '2024-02-01 02:00:00'
Intended query will be executed into MySQL database using *gorm.DB.Raw()
I want to simply insert the values into WHERE conditions as follows:
Value type is standard
time.Time
and query string after.ToSql()
, the question mark is persist instead generated into complete query string with values intended. Am I missing something?Originally, the complete query intended as follows:
Intended query will be executed into MySQL database using
*gorm.DB.Raw()