pg_data_encoder 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -2
- data/lib/pg_data_encoder/version.rb +1 -1
- data/pg_data_encoder.gemspec +2 -1
- metadata +4 -3
data/README.md
CHANGED
@@ -8,11 +8,15 @@ Works well in collaboration with the postgres-copy gem
|
|
8
8
|
|
9
9
|
With it you can make a bulk insert like this
|
10
10
|
|
11
|
+
class Product < ActiveRecord::Base
|
12
|
+
acts_as_copy_target
|
13
|
+
end
|
14
|
+
|
11
15
|
encoder = PgDataEncoder::EncodeForCopy.new
|
12
16
|
encoder.add [1, "test", "first"]
|
13
17
|
encoder.add [2, "test2", "second"]
|
14
18
|
|
15
|
-
Product.
|
19
|
+
Product.copy_from(encoder.get_io, :format => :binary, :columns => [:id, :name, :desc])
|
16
20
|
|
17
21
|
## Try it out yourself, in the examples folder there is a simple test
|
18
22
|
|
@@ -63,7 +67,7 @@ or
|
|
63
67
|
|
64
68
|
## Added type support
|
65
69
|
|
66
|
-
Currently it supports
|
70
|
+
Currently it supports
|
67
71
|
|
68
72
|
* Integers
|
69
73
|
* Strings
|
data/pg_data_encoder.gemspec
CHANGED
@@ -11,7 +11,8 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.description = %q{Creates a binary data file that can be imported into postgres's copy from command}
|
12
12
|
gem.summary = %q{for faster input of data into postgres you can use this to generate the binary import and run COPY FROM}
|
13
13
|
gem.homepage = "https://github.com/pbrumm/pg_data_encoder"
|
14
|
-
|
14
|
+
|
15
|
+
gem.license = 'MIT'
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_data_encoder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -90,7 +90,8 @@ files:
|
|
90
90
|
- spec/spec_helper.rb
|
91
91
|
- spec/verify_data_formats_spec.rb
|
92
92
|
homepage: https://github.com/pbrumm/pg_data_encoder
|
93
|
-
licenses:
|
93
|
+
licenses:
|
94
|
+
- MIT
|
94
95
|
post_install_message:
|
95
96
|
rdoc_options: []
|
96
97
|
require_paths:
|