Commit Graph

4646 Commits

Author SHA1 Message Date
Aaron Patterson
7104122cc3 making query cache work with prepared statements 2010-10-27 14:05:40 -07:00
Aaron Patterson
e73b0b84d9 renaming bind_values to binds where it makes sense 2010-10-26 13:44:11 -07:00
Aaron Patterson
104d0b263e adding backwards compatibility for non-prepare statement handling drivers 2010-10-26 13:44:11 -07:00
Aaron Patterson
fca229e205 caching column values 2010-10-26 13:44:11 -07:00
Aaron Patterson
02128d628c setting the authorized session clears the statement cache 2010-10-26 13:44:11 -07:00
Aaron Patterson
9d9aed433b add a session authorization setter to the pg connection 2010-10-26 13:44:11 -07:00
Aaron Patterson
1741bbe2d5 avoiding statement cache if there are no bind values 2010-10-26 13:44:10 -07:00
Aaron Patterson
28a18b5988 folding async_exec to exec 2010-10-26 13:44:10 -07:00
Aaron Patterson
03e4ea5290 clear cache before resetting the connection 2010-10-26 13:44:10 -07:00
Aaron Patterson
1b4e0b6542 prepare the statement before we cache the key 2010-10-26 13:44:10 -07:00
Aaron Patterson
43bbb25ddd bind substitution is working properly 2010-10-26 13:44:10 -07:00
Aaron Patterson
9d46e0d012 bind parameters are now typecast 2010-10-26 13:44:10 -07:00
Aaron Patterson
e2813479f9 basic bind parameters are working 2010-10-26 13:44:09 -07:00
Aaron Patterson
ffb999125a initial exec() method is working in pg adapter 2010-10-26 13:44:09 -07:00
Aaron Patterson
eb83eb6c98 monkey patching with enumerable so we can call each 2010-10-26 13:44:09 -07:00
Aaron Patterson
fe2ee4fafd monkey patching Mysql::Stmt, calling free on the metadata 2010-10-26 13:44:09 -07:00
Aaron Patterson
ee959a9ca1 free the result after slurping 2010-10-26 13:44:09 -07:00
Aaron Patterson
efc10a8a64 eliminating some calls to execute() 2010-10-26 13:44:09 -07:00
Aaron Patterson
050d7d3e49 statements are cached, cache is cleared on reconnect 2010-10-26 13:44:09 -07:00
Aaron Patterson
d4b0bcb88e all mysql tests are passing 2010-10-26 13:44:09 -07:00
Aaron Patterson
d6b16bbaf7 one more mysql test left! 2010-10-26 13:44:09 -07:00
Aaron Patterson
77b1193ac1 mysql tests are mostly passing 2010-10-26 13:44:08 -07:00
Aaron Patterson
9c7e2e4117 find_one uses prepared statement cache 2010-10-26 13:44:08 -07:00
Aaron Patterson
5abebfb569 clearing statements on disconnect and reset 2010-10-26 13:44:08 -07:00
Aaron Patterson
54ff59f3ba refactoring tests 2010-10-26 13:44:08 -07:00
Aaron Patterson
d7207cf504 type casting bound value based on column associated with value 2010-10-26 13:44:08 -07:00
Aaron Patterson
76d0805786 stop calling execute directly on the database connection 2010-10-26 13:44:08 -07:00
Aaron Patterson
77d548a6d3 removing another execute 2010-10-26 13:44:08 -07:00
Aaron Patterson
7023d73f26 removing more execute calls 2010-10-26 13:44:08 -07:00
Aaron Patterson
e60fecd829 removing more calls to execute 2010-10-26 13:44:08 -07:00
Aaron Patterson
853d39e854 removing some uses of execute 2010-10-26 13:44:07 -07:00
Aaron Patterson
cc468d3ec8 exec returns an AR::Result 2010-10-26 13:44:07 -07:00
Aaron Patterson
6ceffb8178 adding bind_values to relations 2010-10-26 13:44:07 -07:00
Aaron Patterson
497218d5db adding bind value substitution 2010-10-26 13:44:07 -07:00
Aaron Patterson
ef0cf143a9 adding the abstract method 2010-10-26 13:44:07 -07:00
Aaron Patterson
c376fd488c Revert "removing unused variable"
This reverts commit 3e4ede81d6.
2010-10-26 13:43:06 -07:00
Aaron Patterson
f61f758761 reducing the number of parameters to select() 2010-10-26 13:43:06 -07:00
Aaron Patterson
5685a5c41c refactor to remove through_records 2010-10-23 20:29:46 -07:00
Aaron Patterson
6c998a79c8 removing dead code 2010-10-23 20:29:46 -07:00
Aaron Patterson
3e4ede81d6 removing unused variable 2010-10-23 20:29:46 -07:00
Aaron Patterson
ee71a3fbfc removing call to deprecated API, this test is outside AR responsibilities 2010-10-22 13:33:59 -07:00
Aaron Patterson
1ce76db918 if it responds to :usec, it should also "act like" a time 2010-10-22 13:31:44 -07:00
Aaron Patterson
40491b4654 removing space errors 2010-10-22 10:35:08 -07:00
Xavier Noria
a031fc57c8 made a pass in AR's schema.rb to keep (most) create statements in lexicographic order, and fixed an FK 2010-10-22 16:55:02 +02:00
Xavier Noria
5b86c3e5bb has_one maintains the association with separate after_create/after_update
This way parent models can get their own after_create and
after_update callbacks fired after has_one has done its job.
2010-10-22 10:28:53 +02:00
Aaron Patterson
410114e85a adding a test to ensure offsets with no limits will work [#5316 state:resolved] 2010-10-20 17:17:22 -07:00
Aaron Patterson
828bb94d5a use grep instead of select + is_a? 2010-10-20 16:41:50 -07:00
Aaron Patterson
4be0fc124a use a map and flatten to avoid << calls on array 2010-10-20 16:20:49 -07:00
Aaron Patterson
784177aeee only call column_methods_hash once, use array math for faster test of existence 2010-10-20 16:17:15 -07:00
Aaron Patterson
7f444a3db6 roll up weird method to meta programmed method 2010-10-20 15:51:44 -07:00