Handling multi-connection
Setup the multiple connections
Clear::SQL.init("default", "postgres://[USER]:[PASSWORD]@[HOST]/[DATABASE]")
Clear::SQL.add_connection("secondary", "postgres://[USER]:[PASSWORD]@[HOST]/[DATABASE]") Clear::SQL.init(
"default" => "postgres://[USER]:[PASSWORD]@[HOST]/[DATABASE]",
"legacy" => "postgres://[USER]:[PASSWORD]@[HOST]/[DATABASE]"
)Setup model connection
class OldUser
self.table = "users"
self.connection = "legacy"
endOther connection with SQL Builder
Last updated