How to implement multiple database connection??

32 views
Skip to first unread message

Braulio Lima

unread,
Jan 15, 2015, 2:37:32 PM1/15/15
to chica...@googlegroups.com
How to implement multiple database connection with Chicago Boss??

Thanks.

emacstheviking

unread,
Jan 15, 2015, 3:30:18 PM1/15/15
to chica...@googlegroups.com
db_shard configuration, it's in the sample boss.config

%% Database sharding
%% A list of proplists with per-shard database configuration.
%% The proplists override the above options, and should contain two
%% additional options:
%%  {db_shards, [
%%      [
%%          {db_host, "localhost"},
%%          {db_adapter, mysql},
%%          {db_port, 3306},
%%          {db_username, "dbuser"},
%%          {db_password, "dbpass"},
%%          {db_database, "database"},
%%          {db_shard_id, shard_id_atom},
%%          {db_shard_models, [model_atom_1, model_atom_2,
%%                             model_atom_3, etc]}
%%      ]
%%  ]},


I guess you can connect to multiple or the same types of database, anybody care to confirm as I have not used more than the one connection so far.

There are examples on this group if you look, I've seen at least one poasting asking similar questions.

Emacs the Viking

unread,
Jan 15, 2015, 3:30:40 PM1/15/15
to chica...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages