Sha256: ba8591cbaf9a529facafc9647ace289c3734a0e882eb8bc52db676bfc4dfb884

Contents?: true

Size: 466 Bytes

Versions: 2

Compression:

Stored size: 466 Bytes

Contents

require 'shellwords'
module Hanami
  module Model
    module Adapters
      module Sql
        module Consoles
          class Sqlite
            def initialize(uri)
              @uri = uri
            end

            def connection_string
              "sqlite3 #{@uri.host}#{database}"
            end

            private

            def database
              Shellwords.escape(@uri.path)
            end
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hanami-model-0.6.1 lib/hanami/model/adapters/sql/consoles/sqlite.rb
hanami-model-0.6.0 lib/hanami/model/adapters/sql/consoles/sqlite.rb