|
You are here |
samsaffron.com | ||
| | | | |
pganalyze.com
|
|
| | | | | We create domain types and composite types in PostgreSQL and show how to hook into the Rails Attributes API to help instantiate them as objects that Ruby can use. | |
| | | | |
tenderlovemaking.com
|
|
| | | | | File.open('somefile.txt', 'wb') do |fh| # Open the file fh.write "hello world" # Do some work with the file end # Close file when block returns ActiveRecord::Base.establish_connection( :adapter => "sqlite", :database => "path/to/dbfile") connection_handle = ActiveRecord::Base.connection def retrieve_connection_pool(klass) pool = @connection_pools[klass.name] return pool if pool return nil if ActiveRecord::Base == klass retrieve_connection_pool klass.superclass end spec = ActiveRecord::Base.specificiation ActiveRecord::ConnectionPool.open(spec) do |conn| ... end spec = database_a ActiveRecord::ConnectionPool.open(spec) do |conn| User.find_all end spec = database_b ActiveRecord::ConnectionPool.open(spec) do |conn| User.find_all end # Retrieve the connection as... | |
| | | | |
janko.io
|
|
| | | | | When I started developing the Rails integration for Rodauth, one of the first problems I needed to solve was how to make Rodauth work seamlessly with Active Record, given that it uses Sequel for database interaction. I believed these two could coexist together, because Sequel is mostly hidden from the Rodauth user anyway, and all that really matters is that Rodauth's SQL statements get executed on the database. | |
| | | | |
www.notion.so
|
|
| | | How Notion build and grew our data lake to keep up with rapid growth | ||