Sha256: dc41d14053c2e932d15e649316aa47433dc945d3b3fb2f612ddbaa57ff2cf43b

Contents?: true

Size: 1.03 KB

Versions: 7

Compression:

Stored size: 1.03 KB

Contents

Sequel.require 'adapters/shared/sqlite'

module Sequel
  module DataObjects
    # Database and Dataset support for SQLite databases accessed via DataObjects.
    module SQLite
      # Instance methods for SQLite Database objects accessed via DataObjects.
      module DatabaseMethods
        include Sequel::SQLite::DatabaseMethods
        
        private
        
        # Default to a single connection for a memory database.
        def connection_pool_default_options
          o = super
          uri == 'sqlite3::memory:' ? o.merge(:max_connections=>1) : o
        end
        
        # Execute the connection pragmas on the connection
        def setup_connection(conn)
          connection_pragmas.each do |s|
            com = conn.create_command(s)
            log_yield(s){com.execute_non_query}
          end
          super
        end
      end
      
      # Dataset class for SQLite datasets accessed via DataObjects.
      class Dataset < DataObjects::Dataset
        include Sequel::SQLite::DatasetMethods
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sequel-3.34.1 lib/sequel/adapters/do/sqlite.rb
sequel-3.34.0 lib/sequel/adapters/do/sqlite.rb
sequel-3.33.0 lib/sequel/adapters/do/sqlite.rb
sequel-3.32.0 lib/sequel/adapters/do/sqlite.rb
sequel-3.31.0 lib/sequel/adapters/do/sqlite.rb
sequel-3.30.0 lib/sequel/adapters/do/sqlite.rb
sequel-3.29.0 lib/sequel/adapters/do/sqlite.rb