lib/ezframe/database.rb in ezframe-0.3.0 vs lib/ezframe/database.rb in ezframe-0.4.0
- old
+ new
@@ -7,16 +7,16 @@
def init(dbfile = nil, opts = {})
@dbfile = dbfile || ENV["EZFRAME_DB"] || Config[:database]
unless @dbfile
raise "database settings error: dbfile=#{Config[:database]}"
end
- if Config[:use_connection_pool] || opts[:use_connection_pool]
- @pool = Sequel::ConnectionPool(max_connections: 10) do
- Sequel.connect(@dbfile, loggers: [EzLog])
- end
- else
- connect(@dbfile)
- end
+ #if Config[:use_connection_pool] || opts[:use_connection_pool]
+ #@pool = Sequel::ConnectionPool.new(max_connections: 10) do
+ # Sequel.connect(@dbfile, loggers: [EzLog])
+ #end
+ #else
+ connect(@dbfile)
+ #end
end
def connect(dbfile = nil)
dbfile ||= @dbfile
@sequel = Sequel.connect(dbfile, EzLogs: [EzLog])