You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- name: SearchAuthorsFullText :many
SELECT * FROM authors
WHERE MATCH(name) AGAINST(sqlc.arg(search_term))
ORDER BY name = sqlc.arg(search_term) DESC,
MATCH(name) AGAINST(sqlc.arg(search_term)) DESC
LIMIT ?;
The playground link does not show this behavior (actually shows a different bug), most likely because you can't use version past 1.25
Relevant log output
Database schema
CREATETABLEauthors (
id intNOT NULL AUTO_INCREMENT,
name textNOT NULL,
bio text,
PRIMARY KEY(`id`),
FULLTEXT KEY `idx_fulltext` (`name`)
);
SQL queries
-- name: SearchAuthorsFullText :manySELECT*FROM authors
WHERE MATCH(name) AGAINST(sqlc.arg(search_term))
ORDER BY name =sqlc.arg(search_term) DESC,
MATCH(name) AGAINST(sqlc.arg(search_term)) DESCLIMIT ?;
Activity
Dedupe sqlc.arg parameters wrapped in a type cast for MySQL
andylin-0 commentedon Apr 17, 2026
thanks @kyleconroy !!