Method: QDA::Backend::MySQL#sql_store_document
- Defined in:
- lib/weft/backend/mysql.rb
#sql_store_document(doc) ⇒ Object
256 257 258 259 260 261 262 263 264 |
# File 'lib/weft/backend/mysql.rb', line 256 def sql_store_document(doc) @dbh.do("INSERT INTO docs VALUES (?, ?, ?, ?)", doc.doc_id, doc.title, doc.memo, doc.external?) doc.fragments.each_with_index do | frag, i | @dbh.do("INSERT INTO fragments VALUES(?, ?, ?)", doc.doc_id, i, frag) end end |