2012-10-16 43 views
3

Binary data inserted for string type on column ...是什麼意思?在`remote_ip`列插入'string`類型的二進制數據?

當在一個SQLite表洛遠程IP地址,則在調試控制檯的消息:

Started GET "/test?name=abcde" for 127.0.0.1 at 2012-10-16 18:02:01 +0800 
Processing by TestController#index as HTML 
    Parameters: {"name"=>"abcde"} 
    (0.1ms) begin transaction 
Binary data inserted for `string` type on column `query` 
Binary data inserted for `string` type on column `remote_ip` 
    SQL (0.6ms) INSERT INTO "requests" ("controller", "query", "remote_ip") VALUES (?, ?, ?) [["controller", "test"], ["query", "name=abcde"], ["remote_ip", "127.0.0.1"]] 
    (2.5ms) commit transaction 

表被定義爲:

class CreateRequests < ActiveRecord::Migration 
    def change 
    create_table :requests do |t| 
     t.string :controller, :limit => 128 
     t.string :remote_ip, :limit => 128 
     t.string :query,  :limit => 2048 
    end 
    end 
end 

配置:

OS X Lion 
ruby 1.9.3p194 
Rails 3.2.8 
sqlite3 (1.3.6) 
sqlite3-ruby (1.3.2) 

回答

相關問題