如何在SQLite3和Rails 3.1中打开REGEXP?
发布时间:2020-12-12 19:13:05 所属栏目:百科 来源:网络整理
导读:我使用SQLite3数据库在Rails 3中有以下语句: word = 'Hello'word_entry = Word.where("name REGEXP :word",{:word = "[[::]]#{word}[[::]]"}) 但是,在SQLite3下运行时,我不断得到: SQLite3::SQLException: no such function: REGEXP 我在SQLite3文档中读到
我使用SQLite3数据库在Rails 3中有以下语句:
word = 'Hello' word_entry = Word.where("name REGEXP :word",{:word => "[[:<:]]#{word}[[:>:]]"}) 但是,在SQLite3下运行时,我不断得到:
我在SQLite3文档中读到它确实支持REGEXP函数. gem 'sqlite3' 我的数据库配置文件如下所示: development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 有什么想法正在发生什么? 解析度: https://github.com/sei-mi/sqlite3_ar_regexp (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |