method
quote
rails latest stable - Class:
ActiveRecord::ConnectionAdapters::SQLite3Adapter
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v4.1.8) is shown here.
quote(value, column = nil)public
QUOTING ==================================================
# File activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb, line 228
def quote(value, column = nil)
if value.kind_of?(String) && column && column.type == :binary
s = value.unpack("H*")[0]
"x'#{s}'"
else
super
end
end Related methods
- Instance methods
- active?
- adapter_name
- add_column
- allowed_index_name_length
- begin_db_transaction
- change_column
- change_column_default
- change_column_null
- clear_cache!
- columns
- commit_db_transaction
- create
- delete_sql
- disconnect!
- encoding
- exec_delete
- exec_query
- exec_update
- execute
- explain
- indexes
- insert_sql
- last_inserted_id
- native_database_types
- primary_key
- quote
- quote_column_name
- quote_string
- quote_table_name_for_assignment
- quoted_date
- remove_column
- remove_index!
- rename_column
- rename_table
- requires_reloading?
- rollback_db_transaction
- select_rows
- supports_add_column?
- supports_ddl_transactions?
- supports_explain?
- supports_index_sort_order?
- supports_migrations?
- supports_partial_index?
- supports_primary_key?
- supports_savepoints?
- supports_statement_cache?
- table_exists?
- tables
- type_cast
- update_sql
- valid_alter_table_options
- Class methods
- new
- Protected methods
-
alter_table -
copy_table -
copy_table_contents -
copy_table_indexes -
move_table -
select -
sqlite_version -
table_structure -
translate_exception