Commit Graph

83 Commits

Author SHA1 Message Date
Brian Lopez 0bab31a61f mysql2 adapter moved into AR3 core 2010-08-09 14:52:45 -07:00
Brian Lopez 7bf9889103 remove Sequel adapter as it's now in Sequel core :) 2010-08-06 12:47:25 -07:00
Brian Lopez 2527454b26 update AR adapter to reflect timezone setting update 2010-08-06 00:01:24 -07:00
Brian Lopez 957b0bac1b default application_timezone to nil 2010-08-05 23:09:13 -07:00
Brian Lopez f4fb9e8034 sync up with sequel adapter from my Sequel fork until it's officially merged in 2010-08-05 22:53:36 -07:00
Brian Lopez ad34357e57 convert :timezone option into two new ones
:database_timezone - the timezone (:utc or :local) Mysql2 will assume time/datetime fields are stored in the db. This modifies what initial timezone your Time objects will be in when creating them from libmysql in C
and
:application_timezone - the timezone (:utc or :local) you'd finally like the Time objects converted to before you get them
2010-08-05 22:50:45 -07:00
Brian Lopez 1bdf44ce7f can't call literal here because it'll try to join it's own thread 2010-08-05 01:20:42 -07:00
Brian Lopez 04932b549b Mysql2::Client uses the :username key, set it to :user if that was used instead 2010-08-05 01:20:15 -07:00
Brian Lopez 93fabe2b24 heh 2010-08-05 00:45:56 -07:00
Brian Lopez 86302eb1f1 fix typo in comment 2010-08-05 00:45:33 -07:00
Brian Lopez d1b2f98b7c major refactor of Sequel adapter - it's now green in Sequel 2010-08-05 00:44:01 -07:00
Brian Lopez 2514fafa53 add :cast_booleans option for automatically casting tinyint(1) fields into true/false for ruby 2010-08-05 00:39:11 -07:00
Brian Lopez 923393351a initialize @active early on to prevent warnings later 2010-08-03 20:45:00 -07:00
Brian Lopez 074885cca1 cleanup in AR adapter 2010-08-02 01:26:15 -07:00
Brian Lopez 00ab233606 remove performance overrides of select_one, select_value, and select_values in the AR adapter for now 2010-08-02 01:26:04 -07:00
Brian Lopez 1086233cc3 bugfix for how arel resolves compiler paths 2010-08-02 01:21:09 -07:00
Brian Lopez fc6c24a20c add support for configuring which timezone Time objects should be created in 2010-08-02 01:20:03 -07:00
Brian Lopez 36c243be71 Add cascading options hash at Mysql2::Client.default_query_options, which can be overridden by passing options to Mysql2::Client#query and/or Mysql2::Result#each
Tune up specs, benchmarks and AR adapter to conform
2010-08-01 20:20:48 -07:00
Brian Lopez 89401acff4 make sure we tell AR the proper attribute types for SET and BIT fields as well 2010-07-28 14:54:33 -07:00
Brian Lopez 9241f35df3 fixes after merge 2010-07-27 09:26:07 -07:00
Brian Lopez a45cb10dec move connection into method 2010-07-27 09:23:50 -07:00
Brian Lopez 56ecff58bf don't attempt a query unless a connection exists to do it on 2010-07-26 00:10:49 -07:00
Brian Lopez 20ef2e5e27 cleanup connection handling in AR adapter, this should finally resolve GH#31 2010-07-23 23:43:02 -07:00
Brian Lopez a878ba0272 make sure we create @encoding before setting encoding 2010-07-21 13:17:32 -07:00
Brian Lopez 3da993ce53 prevent ruby warning when attempting to lookup the @encoding ivar before it exists 2010-07-21 13:13:08 -07:00
Brian Lopez cd1a2bf9ff Revert "force reconnect behavior to true, remove open connection checks since libmysql will handle this for us now"
This reverts commit 70a7298dc3.
2010-07-21 12:13:27 -07:00
Brian Lopez 70a7298dc3 force reconnect behavior to true, remove open connection checks since libmysql will handle this for us now 2010-07-21 11:47:16 -07:00
Brian Lopez 678ff1cee9 fall back to blocking behavior for em_mysql2 AR adapter if EM isn't running 2010-07-20 18:48:32 -07:00
Brian Lopez 3ec92096ca MySQL -> Mysql2 naming in AR adapter 2010-07-20 09:14:37 -07:00
Brian Lopez 1c02820f4b updating files for release 2010-07-17 18:11:01 -07:00
Brian Lopez 807875e321 make sure queries run through the Sequel logger 2010-07-16 10:26:53 -07:00
Brian Lopez edb742fee7 check for and support field-level encodings
raise an exception for invalid encodings passed to Mysql2::Client#new
2010-07-10 23:15:54 -07:00
Brian Lopez e385e7cf6b Initial refactor of encoding support to ensure we map Ruby encodings to MySQL encodings properly. 2010-07-08 22:22:20 -07:00
mperham 3f2e948c5f Support for asynchronous ActiveRecord via Fibers and EM 2010-07-09 05:47:09 +08:00
Brian Lopez 39b4776a67 the AR adapter's #select_rows method should be returning an array of arrays (thanks to r-stu31 for the patch) 2010-07-08 09:18:58 -07:00
Aaron Patterson a6b1247ede partial implementation of result in Ruby 2010-07-06 13:16:49 -07:00
Aaron Patterson 74e99bae5f refactoring initialize to be done in ruby, adding setter methods for connection options 2010-07-04 19:29:12 -07:00
Brian Lopez 40f3a2c491 default the username to 'root' if nothing was specified 2010-06-30 10:47:53 -07:00
Aaron Patterson 6ef738200d moving the error class to ruby 2010-06-30 10:10:59 -07:00
Aaron Patterson 0b36eae450 moving requires to the .rb files 2010-06-30 09:36:42 -07:00
Eric Wong 77cd0c435d symbolize keys for the Sequel adapter
The "schema_parse_table" method in
lib/sequel/adapters/shared/mysql.rb of Sequel 3.12.1
depends on symbolized keys.
2010-06-29 20:42:45 -07:00
Aaron Patterson 04b9fe17cc made extension more rake-compiler friendly, made the spec task depend on "compile" 2010-06-30 08:20:42 +08:00
Brian Lopez d4beaf3059 apply proper fix for timezone support, and fix specs accordingly 2010-06-08 15:16:37 -07:00
Brian Lopez d7e0d551f8 update files for 0.1.8 release 2010-06-02 00:37:59 -07:00
Brian Lopez 39c894a1bd use Time.zone instead 2010-06-01 15:01:21 -07:00
Brian Lopez c7e9ecdcbd fix timezone handling in the AR adapter 2010-06-01 11:17:59 -07:00
Brian Lopez f89d2b257b update files for 0.1.7 release 2010-05-22 12:32:27 -07:00
Brian Lopez 49e50cad14 we don't need the connection around after a disconnect 2010-05-22 11:56:23 -07:00
Brian Lopez d67e7eda20 update files for 0.1.6 release 2010-05-14 18:23:13 -07:00
Brian Lopez b676a33bf9 Revert "optimize casting to it only happens for default values"
This reverts commit 48db8907be.
2010-05-14 17:37:09 -07:00