Class: Arc::DataStores::MysqlDataStore
Constant Summary
Constants included
from Casting
Casting::CAST_METHODS, Casting::TYPES
Instance Method Summary
collapse
#[], #create, #destroy, #read, #result_for, #type_mappings_for, #update
Methods included from Casting
#cast
Methods included from Quoting
#quote, #quote_table
#columns_hash, #connection, #connection_pool, #primary_key, #quote_hash, #spec, #table_exists?, #visitor, #with_connection
Instance Method Details
#cast_blob(data) ⇒ Object
27
28
29
30
|
# File 'lib/arc/data_stores/mysql/store.rb', line 27
def cast_blob data
debugger
data
end
|
#execute(query) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/arc/data_stores/mysql/store.rb', line 16
def execute query
result = with_store do |store|
store.query query
end
result.entries if result.respond_to? :entries
end
|
#quote_blob(data) ⇒ Object
31
32
33
34
35
|
# File 'lib/arc/data_stores/mysql/store.rb', line 31
def quote_blob data
with_store do |store|
"'#{store.escape(data).force_encoding("BINARY")}'"
end
end
|
#quote_column_name(table) ⇒ Object
Also known as:
quote_column
11
12
13
|
# File 'lib/arc/data_stores/mysql/store.rb', line 11
def quote_column_name table
"`#{table}`"
end
|