0

有没有办法将MATCHandAGAINST部分转换为Arel

我在 Arel 源代码中找不到任何关于它的信息。

我正在使用 Rails 3。

SELECT gigs.time, gigs.channel_id, gigs.song_id, gigs.id, 
  MATCH (songs.title) AGAINST (?) AS song_score,
  MATCH (artists.name) AGAINST (?) AS artist_score
  FROM songs
  INNER JOIN artists ON artists.id = songs.artist_id
  INNER JOIN gigs ON gigs.song_id = songs.id
  WHERE MATCH (artists.name) AGAINST (?) OR
  MATCH (songs.title) AGAINST (?)
  HAVING (artist_score + song_score) > 0
4

1 回答 1

1

AFAIK 没有 ArelMATCH AGAINST实现。我的猜测是因为它不是纯 SQL,而是特定于 MySQL。

于 2011-04-07T15:01:19.373 回答