jdbc-vertica 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 153494fc3a827d8a0cfdd5b323eb7b40b1d8c7ce
4
+ data.tar.gz: 7e829a3c0e4fb71a61862d4599f498ff57efff59
5
+ SHA512:
6
+ metadata.gz: e20acf8fecf90336e9313266e6d9720734703cd81299df7f1c4780eea2ed4be33f9d7329923bcefe91c3e97333aec06b691cdc4d1c65655f9d154429e1c6d7fa
7
+ data.tar.gz: 7543711a06e933995660efc89d2fe78d4c1e3d405b898d0d5cb095d89664593a529c9e2e85b7ff04530b5ad04e4c9aba8820a02954a34519dcda6e0db3de8013
@@ -0,0 +1,14 @@
1
+ /.yardoc
2
+ /Gemfile.lock
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ *.bundle
10
+ *.so
11
+ *.o
12
+ *.a
13
+ mkmf.log
14
+ vendor
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1 @@
1
+ jruby-1.7.16
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in jdbc-vertica.gemspec
4
+ gemspec
5
+ gem 'activerecord-jdbc-adapter'
6
+ gem 'dbd-jdbc'
7
+ gem 'dbi'
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 takahiro.nakayama
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,31 @@
1
+ # Jdbc::Vertica
2
+
3
+ Basic library for jdbc vertica.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'jdbc-vertica'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install jdbc-vertica
20
+
21
+ ## Usage
22
+
23
+ see example files.
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/jdbc-vertica/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'jdbc/vertica'
@@ -0,0 +1,21 @@
1
+ require 'activerecord-jdbc-adapter'
2
+ require 'jdbc-vertica'
3
+
4
+ class JdbcTest < ActiveRecord::Base
5
+ end
6
+
7
+ $username = 'dbadmin'
8
+ $password = '********'
9
+ $host = 'veritica.jp'
10
+
11
+ Jdbc::Vertica.load_driver
12
+ ActiveRecord::Base.establish_connection adapter: 'jdbc',
13
+ driver: 'com.vertica.jdbc.Driver',
14
+ url: "jdbc:vertica://#{$host}:5433/",
15
+ username: $username,
16
+ password: $password,
17
+ database: 'vmain',
18
+ schema_search_path: 'sandbox'
19
+ ActiveRecord::Base.connection.execute "SET search_path TO sandbox;"
20
+
21
+ p JdbcTest.all
@@ -0,0 +1,18 @@
1
+ require 'dbi'
2
+ require 'dbd/Jdbc'
3
+ require 'jdbc-vertica'
4
+
5
+ $user = 'dbadmin'
6
+ $password = '********'
7
+ $host = 'vertica.jp'
8
+
9
+ Jdbc::Vertica.load_driver
10
+ DBI.connect(
11
+ "DBI:Jdbc:vertica://#{$host}:5433/",
12
+ $user,
13
+ $password,
14
+ 'driver' => 'com.vertica.jdbc.Driver'
15
+ ) do |dbh|
16
+ puts "Connected"
17
+ p dbh.select_all('select * from dt;')
18
+ end
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'jdbc/vertica/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "jdbc-vertica"
8
+ spec.version = Jdbc::Vertica::VERSION
9
+ spec.authors = ["takahiro.nakayama"]
10
+ spec.email = ["civitaspo@gmail.com"]
11
+ spec.summary = %q{jdbc vertica driver.}
12
+ spec.description = %q{jdbc vertica driver.}
13
+ spec.homepage = "https://github.com/civitaspo/jdbc-vertica"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "rspec"
24
+ end
@@ -0,0 +1 @@
1
+ require 'jdbc/vertica'
@@ -0,0 +1,27 @@
1
+ warn "Jdbc-Vertica is only for use with JRuby" if (JRUBY_VERSION.nil? rescue true)
2
+ require 'jdbc/vertica/version'
3
+
4
+ module Jdbc
5
+ module Vertica
6
+
7
+ def self.driver_jar
8
+ "vertica-jdbc-#{DRIVER_VERSION}-0.jar"
9
+ end
10
+
11
+ def self.load_driver(method = :load)
12
+ send method, driver_jar
13
+ end
14
+
15
+ def self.driver_name
16
+ 'com.vertica.jdbc.Driver'
17
+ end
18
+
19
+ if defined?(JRUBY_VERSION) && # enable backwards-compat behavior :
20
+ ( Java::JavaLang::Boolean.get_boolean("jdbc.driver.autoload") ||
21
+ Java::JavaLang::Boolean.get_boolean("jdbc.vertica.autoload") )
22
+ warn "autoloading JDBC driver on require 'jdbc/vertica'" if $VERBOSE
23
+ load_driver :require
24
+ end
25
+ end
26
+ end
27
+
@@ -0,0 +1,6 @@
1
+ module Jdbc
2
+ module Vertica
3
+ DRIVER_VERSION = '7.0.1'
4
+ VERSION = '0.0.1'
5
+ end
6
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe Jdbc::Vertica do
4
+ it 'has a version number' do
5
+ expect(Jdbc::Vertica::VERSION).not_to be nil
6
+ end
7
+
8
+ it 'does something useful' do
9
+ expect(false).to eq(true)
10
+ end
11
+ end
@@ -0,0 +1,2 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+ require 'jdbc/vertica'
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jdbc-vertica
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - takahiro.nakayama
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ~>
17
+ - !ruby/object:Gem::Version
18
+ version: '1.7'
19
+ name: bundler
20
+ prerelease: false
21
+ type: :development
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: '10.0'
33
+ name: rake
34
+ prerelease: false
35
+ type: :development
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ name: rspec
48
+ prerelease: false
49
+ type: :development
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: jdbc vertica driver.
56
+ email:
57
+ - civitaspo@gmail.com
58
+ executables:
59
+ - jdbc-vertica
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - .bundle/config
64
+ - .gitignore
65
+ - .rspec
66
+ - .ruby-version
67
+ - .travis.yml
68
+ - Gemfile
69
+ - LICENSE.txt
70
+ - README.md
71
+ - Rakefile
72
+ - bin/jdbc-vertica
73
+ - example/activerecord.rb
74
+ - example/connect_and_show_tables.rb
75
+ - jdbc-vertica.gemspec
76
+ - lib/jdbc-vertica.rb
77
+ - lib/jdbc/vertica.rb
78
+ - lib/jdbc/vertica/version.rb
79
+ - lib/vertica-jdbc-7.0.1-0.jar
80
+ - spec/jdbc/vertica_spec.rb
81
+ - spec/spec_helper.rb
82
+ homepage: https://github.com/civitaspo/jdbc-vertica
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubyforge_project:
102
+ rubygems_version: 2.1.9
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: jdbc vertica driver.
106
+ test_files:
107
+ - spec/jdbc/vertica_spec.rb
108
+ - spec/spec_helper.rb