2011-04-07 4 views
0

MATCHAGAINST 부분을 Arel으로 변환 할 수 있습니까?SQL을 Arel로 변환하는 방법?

Arel 소스 코드에서 아무 것도 찾을 수 없습니다.

내가 사용 레일 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 

답변

1

는 AFAIK 더 Arel MATCH AGAINST 구현이 없습니다. 내 추측은 순수한 SQL이 아니고 MySQL에 한정되어 있기 때문입니다.

+0

좋은 지적, 감사합니다! – Oleander

관련 문제