Commit Graph

27 Commits

Author SHA1 Message Date
Brian Lopez
c394122fd9 add some more defaults to the connect flags 2010-10-14 23:38:25 -07:00
Brian Lopez
a6b5e9c28c add connect_flags to default options and add REMEMBER_OPTIONS to that list. fix NUM2INT to be NUM2ULONG as it should be for flags 2010-10-14 08:12:52 -07:00
Anton Mironov
687487d5a5 Detach before executing callbacks.
This allows to make queries in callbacks.
2010-09-28 13:47:19 +08:00
Brian Lopez
98fbeb6f64 add aliases for Mysql compatibility 2010-09-01 11:42:16 -07:00
Brian Lopez
ae6c33a13f add cache_rows option to enable/disable internal row caching for results 2010-08-27 12:08:48 -07:00
Brian Lopez
a19888e939 Make sure we switch over to the DateTime class for DATETIME/TIMESTAMP columns that are out of the supported range for 32bit platforms 2010-08-20 12:07:27 -07:00
Aaron Patterson
ce77899848 connection flags can be passed to the constructor 2010-08-20 09:56:36 -07:00
Aaron Patterson
864cf0f291 exposing client flags 2010-08-20 09:36:15 -07:00
Brian Lopez
cebf9af068 Wrap the MYSQL* again so we can:
1) let mysql_init/mysql_close take care of any/all allocation, thread state and freeing
2) for faster access to the encoding and active state variables for the connection
2010-08-16 02:03:19 -07:00
Brian Lopez
957b0bac1b default application_timezone to nil 2010-08-05 23:09:13 -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
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
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
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
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
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
Aaron Patterson
6ef738200d moving the error class to ruby 2010-06-30 10:10:59 -07:00
Brian Lopez
288ed22806 add initial EM Deferrable API 2010-04-14 12:55:27 -07:00
Brian Lopez
cb9eb5a188 remove Mysql gem compat for now 2010-04-02 16:45:06 -07:00
Brian Lopez
ed62fe51c3 initial lib dir stuff 2010-04-02 16:14:16 -07:00