jdbc-vertica 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +6 -1
- data/Gemfile +1 -0
- data/README.md +14 -0
- data/example/activerecord.rb +21 -7
- data/example/connect_and_show_tables.rb +18 -6
- data/lib/jdbc/vertica/version.rb +1 -1
- data/spec/jdbc/vertica_spec.rb +2 -2
- metadata +24 -26
- data/.ruby-version +0 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: cc7d2741b17ebef0bb030edbdfba79c75f9f7b35
         | 
| 4 | 
            +
              data.tar.gz: 8d8c31dd62618a95cd9f6c1cd53f60bc3406e299
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4a0b27adb15920d93abec73056304a33bc8e7f8e1d20a35fc3f3c5760ad1b9d66904a3d47a31d7c910854155825b805ce93c8d87e17390a3952a70eb97f1aa37
         | 
| 7 | 
            +
              data.tar.gz: b839a30878eab7c5231160576f80a157c17f8833ea07b513211160859c56b4c79eff118948b2bdc12b6e5b7b8c563317ba00d61e9a1a12ccf721bd46ab43a561
         | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/.travis.yml
    CHANGED
    
    
    
        data/Gemfile
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -2,6 +2,16 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Basic library for jdbc vertica.
         | 
| 4 4 |  | 
| 5 | 
            +
            ## Caution
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            Please make sure the below.
         | 
| 8 | 
            +
            **[vertica-jdbc-7.0.1-0.jar](./lib/vertica-jdbc-7.0.1-0.jar) is not under the MIT License. This follows [
         | 
| 9 | 
            +
            Vertica Community Edition HP Software License Agreement](https://my.vertica.com/software-license-agreement/)**
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            ## Requirements
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            * JRuby >= 1.7
         | 
| 14 | 
            +
             | 
| 5 15 | 
             
            ## Installation
         | 
| 6 16 |  | 
| 7 17 | 
             
            Add this line to your application's Gemfile:
         | 
| @@ -29,3 +39,7 @@ see example files. | |
| 29 39 | 
             
            3. Commit your changes (`git commit -am 'Add some feature'`)
         | 
| 30 40 | 
             
            4. Push to the branch (`git push origin my-new-feature`)
         | 
| 31 41 | 
             
            5. Create a new Pull Request
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            ## Inspired
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            Jdbc::Vertica is inspired by ['Jdbc-mysql'](https://github.com/jruby/activerecord-jdbc-adapter/tree/master/jdbc-mysql).
         | 
    
        data/example/activerecord.rb
    CHANGED
    
    | @@ -1,20 +1,34 @@ | |
| 1 1 | 
             
            require 'activerecord-jdbc-adapter'
         | 
| 2 2 | 
             
            require 'jdbc-vertica'
         | 
| 3 | 
            +
            require 'dotenv'
         | 
| 3 4 |  | 
| 4 5 | 
             
            class JdbcTest < ActiveRecord::Base
         | 
| 5 6 | 
             
            end
         | 
| 6 7 |  | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 8 | 
            +
            # Create .env file containing
         | 
| 9 | 
            +
            # HOSTNAME=
         | 
| 10 | 
            +
            # PORT=
         | 
| 11 | 
            +
            # DATABASE=
         | 
| 12 | 
            +
            # USERNAME=
         | 
| 13 | 
            +
            # PASSWORD=
         | 
| 14 | 
            +
            Dotenv.load
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            config = {
         | 
| 17 | 
            +
              hostname: ENV['HOSTNAME'],
         | 
| 18 | 
            +
              port:     ENV['PORT'] || "5433",
         | 
| 19 | 
            +
              username: ENV['USERNAME'],
         | 
| 20 | 
            +
              password: ENV['PASSWORD'],
         | 
| 21 | 
            +
              database: ENV['DATABASE'] || "vmain",
         | 
| 22 | 
            +
            }
         | 
| 23 | 
            +
            puts config
         | 
| 10 24 |  | 
| 11 25 | 
             
            Jdbc::Vertica.load_driver
         | 
| 12 26 | 
             
            ActiveRecord::Base.establish_connection adapter: 'jdbc',
         | 
| 13 27 | 
             
              driver: 'com.vertica.jdbc.Driver',
         | 
| 14 | 
            -
              url: "jdbc:vertica://#{ | 
| 15 | 
            -
              username: | 
| 16 | 
            -
              password:  | 
| 17 | 
            -
              database:  | 
| 28 | 
            +
              url: "jdbc:vertica://#{config[:hostname]}:#{config[:port]}/",
         | 
| 29 | 
            +
              username: config[:username],
         | 
| 30 | 
            +
              password: config[:password],
         | 
| 31 | 
            +
              database: config[:database],
         | 
| 18 32 | 
             
              schema_search_path: 'sandbox'
         | 
| 19 33 | 
             
            ActiveRecord::Base.connection.execute "SET search_path TO sandbox;"
         | 
| 20 34 |  | 
| @@ -1,16 +1,28 @@ | |
| 1 1 | 
             
            require 'dbi'
         | 
| 2 2 | 
             
            require 'dbd/Jdbc'
         | 
| 3 3 | 
             
            require 'jdbc-vertica'
         | 
| 4 | 
            +
            require 'dotenv'
         | 
| 4 5 |  | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 6 | 
            +
            # Create .env file containing
         | 
| 7 | 
            +
            # HOSTNAME=
         | 
| 8 | 
            +
            # PORT=
         | 
| 9 | 
            +
            # USERNAME=
         | 
| 10 | 
            +
            # PASSWORD=
         | 
| 11 | 
            +
            Dotenv.load
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            config = {
         | 
| 14 | 
            +
              hostname: ENV['HOSTNAME'],
         | 
| 15 | 
            +
              port:     ENV['PORT'] || "5433",
         | 
| 16 | 
            +
              username: ENV['USERNAME'],
         | 
| 17 | 
            +
              password: ENV['PASSWORD'],
         | 
| 18 | 
            +
            }
         | 
| 19 | 
            +
            puts config
         | 
| 8 20 |  | 
| 9 21 | 
             
            Jdbc::Vertica.load_driver
         | 
| 10 22 | 
             
            DBI.connect(
         | 
| 11 | 
            -
              "DBI:Jdbc:vertica://#{ | 
| 12 | 
            -
               | 
| 13 | 
            -
               | 
| 23 | 
            +
              "DBI:Jdbc:vertica://#{config[:hostname]}:#{config[:port]}/",
         | 
| 24 | 
            +
              config[:username],
         | 
| 25 | 
            +
              config[:password],
         | 
| 14 26 | 
             
              'driver' => 'com.vertica.jdbc.Driver'
         | 
| 15 27 | 
             
            ) do |dbh|
         | 
| 16 28 | 
             
              puts "Connected"
         | 
    
        data/lib/jdbc/vertica/version.rb
    CHANGED
    
    
    
        data/spec/jdbc/vertica_spec.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,55 +1,55 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: jdbc-vertica
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - takahiro.nakayama
         | 
| 8 | 
            -
            autorequire:
         | 
| 8 | 
            +
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2015-07-21 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            +
              name: bundler
         | 
| 14 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 15 16 | 
             
                requirements:
         | 
| 16 | 
            -
                - - ~>
         | 
| 17 | 
            +
                - - "~>"
         | 
| 17 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 18 19 | 
             
                    version: '1.7'
         | 
| 19 | 
            -
              name: bundler
         | 
| 20 | 
            -
              prerelease: false
         | 
| 21 20 | 
             
              type: :development
         | 
| 21 | 
            +
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 | 
            -
                - - ~>
         | 
| 24 | 
            +
                - - "~>"
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 26 | 
             
                    version: '1.7'
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: rake
         | 
| 28 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 29 30 | 
             
                requirements:
         | 
| 30 | 
            -
                - - ~>
         | 
| 31 | 
            +
                - - "~>"
         | 
| 31 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 32 33 | 
             
                    version: '10.0'
         | 
| 33 | 
            -
              name: rake
         | 
| 34 | 
            -
              prerelease: false
         | 
| 35 34 | 
             
              type: :development
         | 
| 35 | 
            +
              prerelease: false
         | 
| 36 36 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 | 
            -
                - - ~>
         | 
| 38 | 
            +
                - - "~>"
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 40 | 
             
                    version: '10.0'
         | 
| 41 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: rspec
         | 
| 42 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 43 44 | 
             
                requirements:
         | 
| 44 | 
            -
                - -  | 
| 45 | 
            +
                - - ">="
         | 
| 45 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 46 47 | 
             
                    version: '0'
         | 
| 47 | 
            -
              name: rspec
         | 
| 48 | 
            -
              prerelease: false
         | 
| 49 48 | 
             
              type: :development
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 50 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 51 | 
             
                requirements:
         | 
| 52 | 
            -
                - -  | 
| 52 | 
            +
                - - ">="
         | 
| 53 53 | 
             
                  - !ruby/object:Gem::Version
         | 
| 54 54 | 
             
                    version: '0'
         | 
| 55 55 | 
             
            description: jdbc vertica driver.
         | 
| @@ -60,11 +60,9 @@ executables: | |
| 60 60 | 
             
            extensions: []
         | 
| 61 61 | 
             
            extra_rdoc_files: []
         | 
| 62 62 | 
             
            files:
         | 
| 63 | 
            -
            - . | 
| 64 | 
            -
            - . | 
| 65 | 
            -
            - . | 
| 66 | 
            -
            - .ruby-version
         | 
| 67 | 
            -
            - .travis.yml
         | 
| 63 | 
            +
            - ".gitignore"
         | 
| 64 | 
            +
            - ".rspec"
         | 
| 65 | 
            +
            - ".travis.yml"
         | 
| 68 66 | 
             
            - Gemfile
         | 
| 69 67 | 
             
            - LICENSE.txt
         | 
| 70 68 | 
             
            - README.md
         | 
| @@ -83,24 +81,24 @@ homepage: https://github.com/civitaspo/jdbc-vertica | |
| 83 81 | 
             
            licenses:
         | 
| 84 82 | 
             
            - MIT
         | 
| 85 83 | 
             
            metadata: {}
         | 
| 86 | 
            -
            post_install_message:
         | 
| 84 | 
            +
            post_install_message: 
         | 
| 87 85 | 
             
            rdoc_options: []
         | 
| 88 86 | 
             
            require_paths:
         | 
| 89 87 | 
             
            - lib
         | 
| 90 88 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 91 89 | 
             
              requirements:
         | 
| 92 | 
            -
              - -  | 
| 90 | 
            +
              - - ">="
         | 
| 93 91 | 
             
                - !ruby/object:Gem::Version
         | 
| 94 92 | 
             
                  version: '0'
         | 
| 95 93 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 96 94 | 
             
              requirements:
         | 
| 97 | 
            -
              - -  | 
| 95 | 
            +
              - - ">="
         | 
| 98 96 | 
             
                - !ruby/object:Gem::Version
         | 
| 99 97 | 
             
                  version: '0'
         | 
| 100 98 | 
             
            requirements: []
         | 
| 101 | 
            -
            rubyforge_project:
         | 
| 102 | 
            -
            rubygems_version: 2. | 
| 103 | 
            -
            signing_key:
         | 
| 99 | 
            +
            rubyforge_project: 
         | 
| 100 | 
            +
            rubygems_version: 2.4.5
         | 
| 101 | 
            +
            signing_key: 
         | 
| 104 102 | 
             
            specification_version: 4
         | 
| 105 103 | 
             
            summary: jdbc vertica driver.
         | 
| 106 104 | 
             
            test_files:
         | 
    
        data/.ruby-version
    DELETED
    
    | @@ -1 +0,0 @@ | |
| 1 | 
            -
            jruby-1.7.16
         |