aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/callbacks_test.rb
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2015-03-21 21:52:35 +0100
committerLars Kanis <lars@greiz-reinsdorf.de>2015-03-25 15:05:23 +0100
commit9f2f268666e2f5d861905f4740943c85ea70f76e (patch)
tree7c1f5a33704bdb5b6d503bb1d13a0cfdec170b95 /activerecord/test/cases/associations/callbacks_test.rb
parent1d8d5a74b81b8aab1f5e6d233d509a92525ed4e1 (diff)
downloadrails-9f2f268666e2f5d861905f4740943c85ea70f76e.tar.gz
rails-9f2f268666e2f5d861905f4740943c85ea70f76e.tar.bz2
rails-9f2f268666e2f5d861905f4740943c85ea70f76e.zip
PostgreSQL, Add input type casts for primitive types.
Ruby-pg's default way to serialize values for transmission to the database is to call #to_s . This however creates a temporary String object for each value. Setting a class based type map avoids the allocation of this additional String. The performance benefit is measurable in microbenchmarks, but not with the overhead of activerecord. However it's free to use and has no drawback.
Diffstat (limited to 'activerecord/test/cases/associations/callbacks_test.rb')
0 files changed, 0 insertions, 0 deletions